Skip to content

Commit 7da7e6d

Browse files
committed
add build ci
1 parent cd608b6 commit 7da7e6d

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

.github/workflows/build.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- "*"
8+
- "*/*"
9+
- "**"
10+
pull_request:
11+
branches:
12+
- "*"
13+
- "*/*"
14+
- "**"
15+
16+
jobs:
17+
build-windows-release:
18+
runs-on: windows-2019
19+
steps:
20+
- uses: actions/checkout@v3
21+
with:
22+
clean: true
23+
submodules: recursive
24+
fetch-depth: 0
25+
26+
- name: Install CMake
27+
uses: lukka/[email protected]
28+
29+
- name: Generate build files
30+
run: |
31+
mkdir build
32+
cd build
33+
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF .. -G "Visual Studio 16 2019" -A Win32
34+
cmake --build . --config Release
35+
36+
- name: Upload artifacts
37+
uses: actions/upload-artifact@v3
38+
with:
39+
name: crashdetect-win-release
40+
path: build/Release/crashdetect.dll
41+
42+
build-linux-release:
43+
runs-on: ubuntu-18.04
44+
steps:
45+
- uses: actions/checkout@v3
46+
with:
47+
clean: true
48+
submodules: recursive
49+
fetch-depth: 0
50+
51+
- name: Install packages
52+
run: sudo apt-get install g++-multilib
53+
54+
- name: Install CMake
55+
uses: lukka/[email protected]
56+
57+
- name: Generate build files
58+
run: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32
59+
60+
- name: Build
61+
run: |
62+
cd build
63+
cmake --build . --config Release
64+
65+
- name: Upload artifacts
66+
uses: actions/upload-artifact@v3
67+
with:
68+
name: crashdetect-linux-release
69+
path: build/crashdetect.so

0 commit comments

Comments
 (0)