-
Notifications
You must be signed in to change notification settings - Fork 13
73 lines (63 loc) · 1.93 KB
/
ccache.yaml
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
name: ccache
on: push
env:
cpm-path: .cpm
cpm-key: openssl-3.4.0-cpm
jobs:
build:
strategy:
fail-fast: false
matrix:
preset: [android, ios, linux, macos, windows]
include:
- { os: macos, preset: ios }
- { os: macos, preset: macos }
- { os: ubuntu, preset: android }
- { os: ubuntu, preset: linux }
- { os: windows, preset: windows }
name: ${{ matrix.preset }}
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ${{ env.cpm-path }}
key: ${{ env.cpm-key }}
enableCrossOsArchive: true
- name: Install dependencies on Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y ninja-build ccache
- name: Install dependencies on macOS
if: runner.os == 'macOS'
run: |
brew update
brew install ccache
- name: Install dependencies on Windows
if: runner.os == 'Windows'
run: |
choco install -y jom nasm ccache
echo "PATH=$ENV:PATH;C:\Program Files\NASM" >> $ENV:GITHUB_ENV
- name: Configure CMake
run: >
cmake --preset ${{ matrix.preset }}
-DCPM_SOURCE_CACHE="${{ env.cpm-path }}"
-DOPENSSL_BUILD_VERBOSE=ON
-DOPENSSL_CONFIGURE_VERBOSE=ON
- name: Build
run: cmake --build --preset ${{ matrix.preset }}
- name: Clean
run: |
cmake -E rm -rf build
ccache -z
- name: Reconfigure CMake
run: >
cmake --preset ${{ matrix.preset }}
-DCPM_SOURCE_CACHE="${{ env.cpm-path }}"
-DOPENSSL_BUILD_VERBOSE=ON
-DOPENSSL_CONFIGURE_VERBOSE=ON
- name: Rebuild
run: cmake --build --preset ${{ matrix.preset }}
- name: Show ccache statistics
run: ccache -sv