forked from mxmssh/drltrace
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (73 loc) · 2.05 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: build and release
on:
push:
branches:
- master
tags:
- '*'
jobs:
build:
runs-on: windows-latest
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