Skip to content

Update actions version #37

Update actions version

Update actions version #37

Workflow file for this run

name: Build Workflow
on:
push:
branches: '**'
paths:
- '**.hpp'
- '**.cpp'
- '**/CMakeLists.txt'
- 'cmake/**'
- 'deps/**'
- '.github/workflows/build.yml'
pull_request:
paths:
- '**.hpp'
- '**.cpp'
- '**/CMakeLists.txt'
- 'cmake/**'
- 'deps/**'
- '.github/workflows/build.yml'
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: Create environment variables
run: |
$sha = (git rev-parse --short $env:GITHUB_SHA)
echo "RED3EXT_COMMIT_SHA=${sha}" | Out-File -FilePath $env:GITHUB_ENV -Encoding UTF8 -Append
$config = "${{ matrix.config }}".ToLower()
echo "RED3EXT_PRETTY_CONFIG=${config}" | Out-File -FilePath $env:GITHUB_ENV -Encoding UTF8 -Append
- 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_PRETTY_CONFIG }}-${{ env.RED3EXT_COMMIT_SHA }}
path: build/install
if-no-files-found: error