-
-
Notifications
You must be signed in to change notification settings - Fork 34
106 lines (94 loc) · 3.11 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
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: ${{ '16' }}
jobs:
unit-tests:
runs-on: macos-14
strategy:
matrix:
configuration: ["Debug", "Release", "ASAN", "UBSAN"]
steps:
- name: Select the Xcode version
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 }}"
integration-tests:
runs-on: macos-14
steps:
- name: Select the Xcode version
run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app"
- name: Install the dependencies
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
LIMACTL_PATH=$(brew --prefix)/bin/limactl
sudo curl -L -o $LIMACTL_PATH https://github.com/mikekazakov/lima-nohvf/raw/master/limactl && sudo chmod +x $LIMACTL_PATH
colima start --network-address --arch arm64 --vm-type=qemu
- 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
clang-format:
runs-on: macos-14
steps:
- name: Install the dependencies
run: |
brew update
brew install clang-format
- uses: actions/checkout@v4
- name: Run clang-format
run: "cd Scripts && ./run_clang_format.sh --check"
clang-tidy:
runs-on: macos-14
steps:
- name: Select the Xcode version
run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app"
- name: Install the dependencies
run: |
brew update
brew install llvm jq
- uses: actions/checkout@v4
- name: Run clang-tidy
run: "cd Scripts && ./run_clang_tidy.sh --check"
build-unsigned:
runs-on: macos-14
steps:
- name: Select the Xcode version
run: "sudo xcode-select -s /Applications/Xcode_$XC_VERSION.app"
- name: Install the dependencies
run: |
brew install create-dmg pandoc basictex
- uses: actions/checkout@v4
- name: Build and package
run: |
eval "$(/usr/libexec/path_helper)"
cd Scripts && ./build_unsigned.sh
- uses: actions/upload-artifact@v4
with:
name: nimble-commander-unsigned
path: Scripts/*.dmg
if-no-files-found: error