Skip to content

Commit 4a96e0f

Browse files
committed
Add workflow
1 parent b9527f0 commit 4a96e0f

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

.github/workflows/test.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: C/C++ CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test-amd64:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: make
15+
run: make && make test
16+
17+
test-linux-x86:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
platformflags: ["", "-m32"]
22+
env:
23+
PLATFORMFLAGS: ${{platformflags}}
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: install multilib
27+
run: sudo apt-get install --no-install-recommends -y gcc-multilib g++-multilib
28+
- name: make
29+
run: make && make test
30+
31+
test-linux-arm:
32+
runs-on: ubuntu-latest
33+
strategy:
34+
matrix:
35+
include:
36+
- arch: arm
37+
emulator: qemu-arm
38+
abi: arm-linux-gnueabi
39+
- arch: aarch64
40+
emulator: qemu-aarch64
41+
abi: aarch64-linux-gnu
42+
env:
43+
PLATFORM_PREFIX: ${{matrix.abi}}-
44+
EMULATOR: ${{matrix.emulator}}
45+
steps:
46+
- uses: actions/checkout@v2
47+
- name: install qemu
48+
run: sudo apt-get install --no-install-recommends -y qemu-user
49+
- name: install abi lib
50+
run: sudo apt-get install --no-install-recommends -y gcc-${{matrix.abi}} g++-${{matrix.abi}}
51+
- name: make
52+
run: make && make test
53+
54+
test-windows:
55+
runs-on: windows-2019
56+
strategy:
57+
matrix:
58+
platform: [x86, x64, ARM, ARM64]
59+
include:
60+
- platform: x86
61+
folder: Win32
62+
native: yes
63+
- platform: x64
64+
folder: x64
65+
native: yes
66+
steps:
67+
- uses: actions/checkout@v2
68+
- name: Add msbuild to PATH
69+
uses: microsoft/setup-msbuild@v1.0.2
70+
- name: build
71+
run: msbuild.exe vs2019\stackman.sln /p:Platform=${{matrix.platform}}
72+
- name: test
73+
if: ${{ matrix.native == 'yes' }}
74+
run: vs2019\${{matrix.folder}}\Debug\test.exe

0 commit comments

Comments
 (0)