Skip to content

Commit

Permalink
Upgrade to macos-13 and 15, use DRY for Mac jobs (#2090)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
sirknightj authored Dec 5, 2024
1 parent 8c49c94 commit 2dca68a
Showing 1 changed file with 55 additions and 87 deletions.
142 changes: 55 additions & 87 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- main
jobs:
clang-format-check:
runs-on: macos-12
runs-on: macos-13
steps:
- name: Clone repository
uses: actions/checkout@v4
Expand All @@ -22,111 +22,79 @@ jobs:
- name: Run clang format check
run: |
bash scripts/check-clang.sh
mac-os-build-clang:
runs-on: macos-12
env:
CC: /usr/bin/clang
CXX: /usr/bin/clang++
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Build repository
run: |
mkdir build && cd build
cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE
make
- name: Run tests
run: |
cd build
./tst/webrtc_client_test
mac-os-build-gcc:
runs-on: macos-12
env:
CC: gcc
CXX: g++
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Build repository
run: |
mkdir build && cd build
cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE
make
- name: Run tests
run: |
cd build
./tst/webrtc_client_test
mac-os-m1-build-clang:
runs-on: macos-13-xlarge
mac-tests:
strategy:
matrix:
os:
- name: Mac Intel
runner: macos-13
- name: Mac Apple Silicon
runner: macos-15
compiler: [ gcc, clang ]
config:
- name: Shared OpenSSL
cmake_flags: "-DBUILD_TEST=ON"
- name: Static OpenSSL
cmake_flags: "-DBUILD_TEST=ON -DBUILD_STATIC_LIBS=TRUE"
- name: Shared MbedTLS
cmake_flags: "-DBUILD_TEST=ON -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON"
- name: Static MbedTLS
cmake_flags: "-DBUILD_TEST=ON -DBUILD_STATIC_LIBS=TRUE -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON"
fail-fast: false

env:
AWS_KVS_LOG_LEVEL: 2
PKG_CONFIG_PATH: /usr/local/opt/pkgconfig
permissions:
id-token: write
contents: read

runs-on: ${{ matrix.os.runner }}
name: ${{ matrix.os.name }}, ${{ matrix.compiler }}, ${{ matrix.config.name }}

steps:
- name: Clone repository
- name: Checkout repository
uses: actions/checkout@v4

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Install dependencies
run: |
brew install gstreamer glib
- name: Build repository

- name: Install GStreamer
run: |
brew unlink openssl
mkdir build && cd build
sh -c 'cmake .. -DBUILD_TEST=TRUE -DCMAKE_C_COMPILER=$(brew --prefix llvm@15)/bin/clang -DCMAKE_CXX_COMPILER=$(brew --prefix llvm@15)/bin/clang++'
make
- name: Run tests
brew install gstreamer
- name: Configure and build ${{ matrix.config.name }}
run: |
if [[ "${{ matrix.compiler }}" == "gcc" ]]; then
export CC="gcc-14"
export CXX="g++-14"
else
export CC="clang"
export CXX="clang++"
fi
echo "Using $CC and $CXX"
mkdir -p build
cd build
./tst/webrtc_client_test
static-build-mac:
runs-on: macos-12
env:
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Build repository
run: |
mkdir build && cd build
cmake .. -DBUILD_STATIC_LIBS=TRUE -DBUILD_TEST=TRUE
make
if [[ "${{ matrix.compiler }}" == "gcc" ]]; then
# Skip building the tests for Mac with GCC
# https://github.com/awslabs/aws-crt-cpp/issues/605
cmake .. ${{ matrix.config.cmake_flags }} -DENABLE_AWS_SDK_IN_TESTS=OFF
else
cmake .. ${{ matrix.config.cmake_flags }}
fi
make -j$(sysctl -n hw.ncpu)
shell: bash

- name: Run tests
run: |
cd build
./tst/webrtc_client_test
shell: bash

address-sanitizer:
runs-on: ubuntu-20.04
env:
Expand Down

0 comments on commit 2dca68a

Please sign in to comment.