-
-
Notifications
You must be signed in to change notification settings - Fork 0
143 lines (115 loc) · 3.33 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
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Build
on:
push:
branches: [ "main" ]
paths-ignore:
- README.md
- .git*
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
paths-ignore:
- README.md
- .git*
jobs:
lint:
name: SQFLint
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Enable problem matcher
run: echo "::add-matcher::.github/matchers/sqf.json"
- name: SQFLint
uses: arma-actions/sqflint@master
continue-on-error: true # No failure due to many false-positives:
parse:
name: Run SQF parse test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: SQLVM parse test
uses: darkwanderer/sqfvm-action@master
continue-on-error: true # No failure, experimental run
with:
command: --input-sqf addons/factions/fnc_initFactions.sqf
build-extension-windows-x64:
name: Build extension (Windows x64)
runs-on: windows-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Init Cargo cache
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --release
- name: Test
run: cargo test --release
- name: Move library
run: move target/release/dynops.dll dynops_x64.dll
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: extension-x64-windows
path: dynops_x64.dll
retention-days: 1
build-extension-linux-x64:
name: Build extension (Linux x64)
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Init Cargo cache
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --release
- name: Test
run: cargo test --release
- name: Move library
run: mv target/release/libdynops.so dynops_x64.so
- name: Strip library
run: strip --strip-unneeded --keep-file-symbols dynops_x64.so
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: extension-x64-linux
path: dynops_x64.so
retention-days: 1
build:
name: Build addon
runs-on: ubuntu-latest
timeout-minutes: 30
needs:
- build-extension-windows-x64
- build-extension-linux-x64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Windows x64
uses: actions/download-artifact@v3
with:
name: extension-x64-windows
path: .
- name: Download Linux x64
uses: actions/download-artifact@v3
with:
name: extension-x64-linux
path: .
- name: Install HEMTT
uses: arma-actions/hemtt@main
- name: Run HEMTT build
run: hemtt release
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: DynamicOperations-nobin
path: releases/dynops-*.zip
if-no-files-found: error