Skip to content

Workflow file for this run

name: build and release
on:
push: {}
workflow_dispatch: {}
jobs:
build:
runs-on: windows-2022
strategy:
matrix:
generator:
- "Visual Studio 12"
- "Visual Studio 12 Win64"
config:
- Debug
- RelWithDebInfo
platform:
- x86
- x86_amd64
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Update submodules
run: |
git submodule update --init --recursive
- name: Configure CMake
run: |
mkdir build
cd build
cmake -G"${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DBUILD_TOOL_TESTS=ON ..\drltrace_src\
shell: cmd
- 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