Skip to content

Add sequential build workflows #48

Add sequential build workflows

Add sequential build workflows #48

Workflow file for this run

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