Little touches to windows platform code #451
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Workflow | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'ci-*' | |
tags: | |
- 'v*' | |
pull_request: | |
jobs: | |
ci: | |
strategy: | |
matrix: | |
platform: | |
- { name: Linux, os: ubuntu-latest, arch: amd64, script: build-linux.sh } | |
- { name: MacOS, os: macos-latest, arch: amd64, script: build-macos.sh } | |
- { name: Windows, os: windows-latest, arch: amd64, script: build-msvc.ps1 } | |
- { name: Windows, os: windows-latest, arch: x86, script: build-msvc.ps1 } | |
runs-on: ${{ matrix.platform.os }} | |
name: CI (${{ matrix.platform.name }} ${{ matrix.platform.arch }}) | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Ninja | |
uses: ashutoshvarma/setup-ninja@master | |
with: | |
version: 1.10.2 | |
- uses: ilammy/[email protected] | |
if: runner.os == 'Windows' | |
with: | |
arch: ${{ matrix.platform.arch }} | |
- name: Build | |
id: build | |
run: .github/scripts/${{ matrix.platform.script }} | |
env: | |
PLATFORM_ARCH: ${{ matrix.platform.arch }} | |
- name: Test | |
run: | | |
cd build | |
ctest --verbose | |
- name: Upload Artifact | |
# if: startsWith(github.ref, 'refs/tags/') || github.ref_name == 'main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.build.outputs.filename }} | |
path: ${{ steps.build.outputs.filename }} | |
create-release: | |
name: Create Release | |
needs: [ci] | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Build Artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
path: artifacts | |
- name: Calculate Variables | |
id: vars | |
run: | | |
echo "ref_name_without_v=$(echo ${GITHUB_REF_NAME} | cut -c2-)" >>$GITHUB_OUTPUT | |
- name: Create Release | |
id: create_release | |
uses: softprops/[email protected] | |
with: | |
draft: false | |
prerelease: false | |
name: Dethrace ${{ steps.vars.outputs.ref_name_without_v }} | |
generate_release_notes: true | |
files: | | |
artifacts/** |