-
Notifications
You must be signed in to change notification settings - Fork 981
94 lines (81 loc) · 3.59 KB
/
osx-tests.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
name: OSX Tests
on:
workflow_dispatch:
push:
pull_request:
jobs:
testing:
strategy:
fail-fast: false
matrix:
os: [macos-latest]
setup: [unittests, functional, integration]
runs-on: ${{ matrix.os }}
name: OS ${{ matrix.os }} - ${{ matrix.setup }} tests
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip'
- name: Install Python requirements
run: |
pip install -r conans/requirements.txt
pip install -r conans/requirements_server.txt
pip install -r conans/requirements_dev.txt
- name: Install Rosetta 2
run: |
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
- name: Install CMake versions
# Install CMake x86_64 and use Rosetta to run. CMake Universal is supported since 3.18 only.
working-directory: /tmp
run: |
for version in 3.15.7 3.16.9 3.17.5; do
wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}-Darwin-x86_64.tar.gz
tar -xzf cmake-${version}-Darwin-x86_64.tar.gz \
--exclude=CMake.app/Contents/bin/cmake-gui \
--exclude=CMake.app/Contents/doc/cmake \
--exclude=CMake.app/Contents/share/cmake-{version%.*}/Help \
--exclude=CMake.app/Contents/share/vim
mkdir -p ${HOME}/Applications/CMake/${version}
cp -fR cmake-${version}-Darwin-x86_64/CMake.app/Contents/* ${HOME}/Applications/CMake/${version}
/Users/runner/Applications/CMake/${version}/bin/cmake --version
rm -rf cmake-${version}-Darwin-x86_64
rm cmake-${version}-Darwin-x86_64.tar.gz
done
for version in 3.19.7 3.23.1; do
wget -q --no-check-certificate https://cmake.org/files/v${version%.*}/cmake-${version}-macos-universal.tar.gz
tar -xzf cmake-${version}-macos-universal.tar.gz \
--exclude=CMake.app/Contents/bin/cmake-gui \
--exclude=CMake.app/Contents/doc/cmake \
--exclude=CMake.app/Contents/share/cmake-{version%.*}/Help \
--exclude=CMake.app/Contents/share/vim
mkdir -p ${HOME}/Applications/CMake/${version}
cp -fR cmake-${version}-macos-universal/CMake.app/Contents/* ${HOME}/Applications/CMake/${version}
/Users/runner/Applications/CMake/${version}/bin/cmake --version
rm -rf cmake-${version}-macos-universal
rm cmake-${version}-macos-universal.tar.gz
done
- name: Install Bazel
run: |
for version in 6.3.2 7.1.2; do
mkdir -p ${HOME}/Applications/bazel/${version}
wget -q -O ${HOME}/Applications/bazel/${version}/bazel https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-darwin-arm64
chmod +x ${HOME}/Applications/bazel/${version}/bazel
done
- name: Install homebrew dependencies
run: |
brew install xcodegen make libtool xz zlib autoconf automake ninja
- name: Install default Xcode
run: |
sudo xcode-select -s /Applications/Xcode_15.0.1.app
sudo xcode-select --install || true
sudo xcodebuild -license accept
- name: Run Test - ${{ matrix.setup }}
run: |
python -m pytest -x -v --color=auto test/${{ matrix.setup }}