-
Notifications
You must be signed in to change notification settings - Fork 207
60 lines (52 loc) · 1.33 KB
/
macos.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
name: macOS
on:
push:
pull_request:
schedule:
- cron: '0 0 1 * *'
jobs:
build:
runs-on: macos-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Setup build directory
run: mkdir buildproducts
- name: CMake
working-directory: ./buildproducts
run: |
retry=0
max_retries=3
until cmake ..; do
((retry++))
echo "Retry $retry/$max_retries..."
if [ "$retry" -ge "$max_retries" ]; then
echo "CMake configuration failed after $max_retries attempts."
exit 1
fi
sleep 10
done
- name: Make
working-directory: ./buildproducts
run: |
retry=0
max_retries=3
until make; do
((retry++))
echo "Retry $retry/$max_retries..."
if [ "$retry" -ge "$max_retries" ]; then
echo "Make build failed after $max_retries attempts."
exit 1
fi
sleep 10
done
- name: Copy header files to build directory
run: |
cp include/epanet2.h buildproducts/
cp include/epanet2_2.h buildproducts/
cp include/epanet2_enums.h buildproducts/
- uses: actions/upload-artifact@v4
with:
name: libepanet-output
path: buildproducts/