Skip to content

Fix CMake install step #2

Fix CMake install step

Fix CMake install step #2

Workflow file for this run

name: Build Workflow
on:
push:
branches: '**'
paths:
- .github/workflows/cpp-build.yml
- cmake/**
- deps/**
- '**.hpp'
- '**.cpp'
- '**/CMakeLists.txt'
pull_request:
paths:
- .github/workflows/cpp-build.yml
- cmake/**
- deps/**
- '**.hpp'
- '**.cpp'
- '**/CMakeLists.txt'
jobs:
build:
name: Build (${{ matrix.config }})
runs-on: windows-latest
strategy:
matrix:
config: [Debug, Release]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Set commit SHA environment variable
run: |
$sha = (git rev-parse --short ${env:GITHUB_SHA})
Add-Content -LiteralPath ${env:GITHUB_ENV} -Encoding UTF8 -Value "RED3EXT_BUILD_COMMIT_SHA=${sha}"
- name: Set build configuration environment variable
run: |
$config = "${{ matrix.config }}".ToLower()
Add-Content -LiteralPath ${env:GITHUB_ENV} -Encoding UTF8 -Value "RED3EXT_BUILD_CONFIG=${config}"
- name: Create build directory
run: mkdir build
- name: Configure
working-directory: build
run: |
cmake `
-DRED3EXT_INSTALL=ON `
-DRED3EXT_EXTRA_WARNINGS=ON `
-DRED3EXT_TREAT_WARNINGS_AS_ERRORS=ON `
"${{ github.workspace }}"
- name: Build
working-directory: build
run: |
cmake `
--build . `
--config ${{ matrix.config }}
- name: Install
working-directory: build
run: |
cmake `
--install . `
--prefix "${{ github.workspace }}/build/install" `
--config ${{ matrix.config }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: red3ext-${{ env.RED3EXT_BUILD_CONFIG }}-${{ env.RED3EXT_BUILD_COMMIT_SHA }}
path: build/install