Repository navigation
55 lines (49 loc) · 2.1 KB
/
Copy pathiOS.yaml
File metadata and controls
55 lines (49 loc) · 2.1 KB
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
name: iOS
on:
push:
branches: [ "master", "dev" ]
pull_request:
branches: [ "master", "dev" ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
strategy:
matrix:
cxxstdsync: [OFF, ON]
name: iOS-cxxsync${{ matrix.cxxstdsync }}
runs-on: macos-latest
steps:
- uses: actions/checkout@v7
- name: Configure ccache environment
run: echo "CCACHE_DIR=$RUNNER_TEMP/ccache" >> "$GITHUB_ENV"
- name: Restore ccache
uses: actions/cache/restore@v6
with:
path: ${{ runner.temp }}/ccache
key: srt-ccache-ios-${{ runner.os }}-${{ runner.arch }}-${{ matrix.cxxstdsync }}-${{ hashFiles('CMakeLists.txt', 'cmake_object_lib_support.c', 'apps/**', 'common/**', 'haicrypt/**', 'scripts/**', 'srtcore/**') }}
restore-keys: srt-ccache-ios-${{ runner.os }}-${{ runner.arch }}-${{ matrix.cxxstdsync }}-
- name: Install dependency packages
run: |
brew install ccache make llvm
ccache --max-size=200M
ccache --zero-stats
- name: configure
run: |
mkdir _build && cd _build
export PATH="/opt/homebrew/opt/llvm/bin:$PATH" CC=clang CXX=clang++
cmake .. -DCMAKE_MAKE_PROGRAM=gmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DENABLE_ENCRYPTION=OFF -DENABLE_STDCXX_SYNC=${{matrix.cxxstdsync}} -DENABLE_MONOTONIC_CLOCK=OFF -DENABLE_UNITTESTS=OFF -DUSE_CXX_STD=c++11 -DENABLE_BONDING=ON --toolchain scripts/iOS.cmake
- name: build
run: cd _build && cmake --build ./
- name: Save ccache
if: ${{ success() && github.event_name != 'pull_request' }}
uses: actions/cache/save@v6
with:
path: ${{ runner.temp }}/ccache
key: srt-ccache-ios-${{ runner.os }}-${{ runner.arch }}-${{ matrix.cxxstdsync }}-${{ hashFiles('CMakeLists.txt', 'cmake_object_lib_support.c', 'apps/**', 'common/**', 'haicrypt/**', 'scripts/**', 'srtcore/**') }}
- name: Show ccache statistics
if: always()
run: ccache --show-stats