Skip to content

Workflow file for this run

name: build and release
on:
push: {}
workflow_dispatch: {}
jobs:
build:
runs-on: windows-2019
strategy:
matrix:
generator:
- "Visual Studio 16 2019"
- "Visual Studio 16 2019 Win64"
config:
- Debug
- RelWithDebInfo
platform:
- x86
- x86_amd64
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Update submodules
run: |
git submodule update --init --recursive
- name: CMake Configure
uses: threeal/[email protected]
with:
run-build: false
source-dir: drltrace_src
build-dir: build
options: |
CMAKE_BUILD_TYPE=${{ matrix.config }}
BUILD_TOOL_TESTS=ON
- name: Build
run: |
cd build
cmake --build . --config "${{ matrix.config }}"
shell: cmd
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: build-${{ matrix.config }}-${{ matrix.platform }}
path: build/
- name: Run tests
run: |
ctest -VV
shell: cmd
release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
body: |
Release version ${{ github.ref_name }}.
draft: false
prerelease: false
generate_release_notes: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload release artifacts
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: build/
asset_name: build-${{ matrix.config }}-${{ matrix.platform }}.zip
asset_content_type: application/zip