Skip to content

Commit 2dca68a

Browse files
authored
Upgrade to macos-13 and 15, use DRY for Mac jobs (#2090)
* Upgrade to macos-13 and 15, use DRY for Mac jobs, use docker for ubuntu jobs * Revert Ubuntu docker changes * Remove Mac+GCC+Tests combo * Install GStreamer for the mac jobs to check the GStreamer sample builds * Remove unnecessary installs * Build and run the tests without AWS SDK * Add D
1 parent 8c49c94 commit 2dca68a

File tree

1 file changed

+55
-87
lines changed

1 file changed

+55
-87
lines changed

.github/workflows/ci.yml

+55-87
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
- main
1212
jobs:
1313
clang-format-check:
14-
runs-on: macos-12
14+
runs-on: macos-13
1515
steps:
1616
- name: Clone repository
1717
uses: actions/checkout@v4
@@ -22,111 +22,79 @@ jobs:
2222
- name: Run clang format check
2323
run: |
2424
bash scripts/check-clang.sh
25-
mac-os-build-clang:
26-
runs-on: macos-12
27-
env:
28-
CC: /usr/bin/clang
29-
CXX: /usr/bin/clang++
30-
AWS_KVS_LOG_LEVEL: 2
31-
permissions:
32-
id-token: write
33-
contents: read
34-
steps:
35-
- name: Clone repository
36-
uses: actions/checkout@v4
37-
- name: Configure AWS Credentials
38-
uses: aws-actions/configure-aws-credentials@v4
39-
with:
40-
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
41-
aws-region: ${{ secrets.AWS_REGION }}
42-
- name: Build repository
43-
run: |
44-
mkdir build && cd build
45-
cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE
46-
make
47-
- name: Run tests
48-
run: |
49-
cd build
50-
./tst/webrtc_client_test
51-
mac-os-build-gcc:
52-
runs-on: macos-12
53-
env:
54-
CC: gcc
55-
CXX: g++
56-
AWS_KVS_LOG_LEVEL: 2
57-
permissions:
58-
id-token: write
59-
contents: read
60-
steps:
61-
- name: Clone repository
62-
uses: actions/checkout@v4
63-
- name: Configure AWS Credentials
64-
uses: aws-actions/configure-aws-credentials@v4
65-
with:
66-
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
67-
aws-region: ${{ secrets.AWS_REGION }}
68-
- name: Build repository
69-
run: |
70-
mkdir build && cd build
71-
cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE
72-
make
73-
- name: Run tests
74-
run: |
75-
cd build
76-
./tst/webrtc_client_test
77-
mac-os-m1-build-clang:
78-
runs-on: macos-13-xlarge
25+
mac-tests:
26+
strategy:
27+
matrix:
28+
os:
29+
- name: Mac Intel
30+
runner: macos-13
31+
- name: Mac Apple Silicon
32+
runner: macos-15
33+
compiler: [ gcc, clang ]
34+
config:
35+
- name: Shared OpenSSL
36+
cmake_flags: "-DBUILD_TEST=ON"
37+
- name: Static OpenSSL
38+
cmake_flags: "-DBUILD_TEST=ON -DBUILD_STATIC_LIBS=TRUE"
39+
- name: Shared MbedTLS
40+
cmake_flags: "-DBUILD_TEST=ON -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON"
41+
- name: Static MbedTLS
42+
cmake_flags: "-DBUILD_TEST=ON -DBUILD_STATIC_LIBS=TRUE -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON"
43+
fail-fast: false
44+
7945
env:
8046
AWS_KVS_LOG_LEVEL: 2
81-
PKG_CONFIG_PATH: /usr/local/opt/pkgconfig
8247
permissions:
8348
id-token: write
8449
contents: read
50+
51+
runs-on: ${{ matrix.os.runner }}
52+
name: ${{ matrix.os.name }}, ${{ matrix.compiler }}, ${{ matrix.config.name }}
53+
8554
steps:
86-
- name: Clone repository
55+
- name: Checkout repository
8756
uses: actions/checkout@v4
57+
8858
- name: Configure AWS Credentials
8959
uses: aws-actions/configure-aws-credentials@v4
9060
with:
9161
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
9262
aws-region: ${{ secrets.AWS_REGION }}
93-
- name: Install dependencies
94-
run: |
95-
brew install gstreamer glib
96-
- name: Build repository
63+
64+
- name: Install GStreamer
9765
run: |
98-
brew unlink openssl
99-
mkdir build && cd build
100-
sh -c 'cmake .. -DBUILD_TEST=TRUE -DCMAKE_C_COMPILER=$(brew --prefix llvm@15)/bin/clang -DCMAKE_CXX_COMPILER=$(brew --prefix llvm@15)/bin/clang++'
101-
make
102-
- name: Run tests
66+
brew install gstreamer
67+
68+
- name: Configure and build ${{ matrix.config.name }}
10369
run: |
70+
if [[ "${{ matrix.compiler }}" == "gcc" ]]; then
71+
export CC="gcc-14"
72+
export CXX="g++-14"
73+
else
74+
export CC="clang"
75+
export CXX="clang++"
76+
fi
77+
echo "Using $CC and $CXX"
78+
79+
mkdir -p build
10480
cd build
105-
./tst/webrtc_client_test
106-
static-build-mac:
107-
runs-on: macos-12
108-
env:
109-
AWS_KVS_LOG_LEVEL: 2
110-
permissions:
111-
id-token: write
112-
contents: read
113-
steps:
114-
- name: Clone repository
115-
uses: actions/checkout@v4
116-
- name: Configure AWS Credentials
117-
uses: aws-actions/configure-aws-credentials@v4
118-
with:
119-
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
120-
aws-region: ${{ secrets.AWS_REGION }}
121-
- name: Build repository
122-
run: |
123-
mkdir build && cd build
124-
cmake .. -DBUILD_STATIC_LIBS=TRUE -DBUILD_TEST=TRUE
125-
make
81+
82+
if [[ "${{ matrix.compiler }}" == "gcc" ]]; then
83+
# Skip building the tests for Mac with GCC
84+
# https://github.com/awslabs/aws-crt-cpp/issues/605
85+
cmake .. ${{ matrix.config.cmake_flags }} -DENABLE_AWS_SDK_IN_TESTS=OFF
86+
else
87+
cmake .. ${{ matrix.config.cmake_flags }}
88+
fi
89+
make -j$(sysctl -n hw.ncpu)
90+
shell: bash
91+
12692
- name: Run tests
12793
run: |
12894
cd build
12995
./tst/webrtc_client_test
96+
shell: bash
97+
13098
address-sanitizer:
13199
runs-on: ubuntu-20.04
132100
env:

0 commit comments

Comments
 (0)