-
Notifications
You must be signed in to change notification settings - Fork 31
79 lines (71 loc) · 2.54 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
name: Build and Test
on:
push:
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- 'Docs/**'
- '**/*.md'
pull_request:
paths-ignore:
- '.github/ISSUE_TEMPLATE/**'
- 'Docs/**'
- '**/*.md'
workflow_dispatch:
env:
XC_VERSION: ${{ '15.1' }}
jobs:
unit-tests:
runs-on: macos-14
strategy:
matrix:
configuration: ["Debug", "Release", "ASAN", "UBSAN"]
steps:
- name: Select latest Xcode
run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app"
- uses: actions/checkout@v4
- name: Build and run unit tests
run: "cd Scripts && ./run_all_unit_tests.sh ${{ matrix.configuration }}"
# NB! need to run on amd64 since m1 doesn't support nested virtualization
# NB! colima v0.5.6 seem to run more stable than latest - that has occasional network failures (ports are not open)
integration-tests:
runs-on: macos-13
steps:
- name: Select latest Xcode
run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app"
- name: Install deps
run: |
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete
sudo rm -rf /Library/Frameworks/Python.framework/
brew update
brew install docker
brew install colima
brew unlink colima
curl -L -o /usr/local/bin/colima https://github.com/abiosoft/colima/releases/download/v0.5.6/colima-Darwin-x86_64 && sudo chmod +x /usr/local/bin/colima
colima start --network-address
- uses: actions/checkout@v4
- name: Work around GHA issue 7522
run: |
# TODO: Replace this with a better solution. See https://github.com/actions/runner-images/issues/7522
echo Killing XProtect...; sudo pkill -9 XProtect >/dev/null || true;
echo Waiting for XProtect process...; while pgrep XProtect; do sleep 3; done;
- name: Build and run unit tests
env:
NC_SENSITIVE: ${{ secrets.NC_SENSITIVE }}
run: |
echo -n "$NC_SENSITIVE" | base64 --decode -o /Users/runner/.nc_sensitive.h
cd Scripts && ./run_all_integration_tests.sh
build-unsigned:
runs-on: macos-14
steps:
- name: Select latest Xcode
run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app"
- name: Install deps
run: brew install create-dmg
- uses: actions/checkout@v4
- name: Build and package
run: "cd Scripts && ./build_unsigned.sh"
- uses: actions/upload-artifact@v4
with:
name: nimble-commander-unsigned
path: Scripts/*.dmg
if-no-files-found: error