-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (41 loc) · 1.21 KB
/
build.yml
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
name: CI
on:
push:
branches: [ main ]
tags: ['*']
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install Conan
id: conan
uses: turtlebrowser/[email protected]
- name: Configure conan
run: |
conan profile new default --detect
conan profile update settings.compiler.libcxx=libstdc++11 default
- name: Build
run: |
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=/usr/bin/gcc-10 -DCMAKE_CXX_COMPILER=/usr/bin/g++-10 -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --parallel $(nproc)
- name: Unit test
run: |
cd build && ctest -V
- name: Smoke test
run: |
$GITHUB_WORKSPACE/build/bin/asm-parser $GITHUB_WORKSPACE/resources/example_intel.asm > ./example_intel.json
- uses: actions/upload-artifact@v2
with:
path: build/bin/asm-parser
- name: Release
uses: fnkr/github-action-ghr@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GHR_COMPRESS: xz
GHR_PATH: build/bin/
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}