-
Notifications
You must be signed in to change notification settings - Fork 3
87 lines (65 loc) · 2.07 KB
/
Copy pathc-cpp.yml
File metadata and controls
87 lines (65 loc) · 2.07 KB
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
85
86
87
name: C/C++ CI
on:
push:
branches: [ dev, stable, dev-0.9.9, dev-1.0.0, dev-packaging]
pull_request:
branches: [ dev, stable, dev-0.9.9, dev-1.0.0, dev-packaging]
env:
SPECS_BRANCH: ${{ github.event.pull_request.base.ref || github.ref_name }}
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Dump event info
env:
PR_EVENT: ${{ toJSON(github.event.pull_request) }}
run: |
echo "Event: ${{ github.event_name }}, Ref: ${{ github.ref }}, SPECS_BRANCH: ${SPECS_BRANCH}"
echo "$PR_EVENT"
- name: Install Python dev headers
run: sudo apt-get install -y python3-dev
- name: configure
working-directory: specs/src
run: python3 setup.py --branch ${SPECS_BRANCH} --python python3
- name: make
working-directory: specs/src
run: make all
- name: Test specs executable
run: specs/exe/specs "@version" WRITE "@platform"
- name: make check
working-directory: specs/src
run: make run_tests
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: configure
working-directory: specs/src
run: python3 setup.py -c CLANG --branch ${SPECS_BRANCH} --python python3
- name: make
working-directory: specs/src
run: make all
- name: Test specs executable
run: specs/exe/specs "@version" WRITE "@platform"
- name: make check
working-directory: specs/src
run: make run_tests
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Build specs (Debug)
run: msbuild specs/specs.sln /p:Configuration=Debug /p:Platform=x64
- name: Build specs (Release)
run: msbuild specs/specs.sln /p:Configuration=Release /p:Platform=x64
- name: Test specs executable
run: specs/bin/Release/specs.exe "@version" WRITE "@platform"