[DO NOT MERGE] ci: Test on ubuntu-24.04 #1088
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2023-present The Bitcoin Core developers | |
# Distributed under the MIT software license, see the accompanying | |
# file COPYING or https://opensource.org/license/mit/. | |
name: CMake | |
on: | |
# Running for pushes is enough in the cmake-staging branch. | |
# pull_request: | |
push: | |
branches: | |
- '**' | |
tags-ignore: | |
- '**' | |
concurrency: | |
group: ${{ github.workflow }}${{ github.event_name != 'pull_request' && github.run_id || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ubuntu-jammy-native: | |
name: 'Ubuntu 24.04, CMake 3.22, Boost ${{ matrix.conf.boost_version }}' | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
conf: | |
- boost_version: '1.73.0' | |
boost_archive: 'boost_1_73_0' | |
- boost_version: '1.78.0' | |
boost_archive: 'boost_1_78_0' | |
- boost_version: '1.84.0' | |
boost_archive: 'boost_1_84_0' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Remove preinstalled CMake | |
run: | | |
sudo rm /usr/local/bin/cmake /usr/local/bin/ctest | |
- name: Install packages | |
run: | | |
# Workaround for https://github.com/actions/runner-images/issues/9733. | |
sudo rm /etc/apt/sources.list.d/microsoft-prod.list | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends curl cmake ccache libevent-dev libsqlite3-dev libdb-dev libdb++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev systemtap-sdt-dev | |
echo "CCACHE_DIR=${{ runner.temp }}/ccache" >> "$GITHUB_ENV" | |
- name: CMake version | |
run: | | |
cmake --version | |
ctest --version | |
- name: Download Boost | |
run: | | |
curl --location --remote-name https://boostorg.jfrog.io/artifactory/main/release/${{ matrix.conf.boost_version }}/source/${{ matrix.conf.boost_archive }}.tar.gz | |
tar -xf ${{ matrix.conf.boost_archive }}.tar.gz | |
- name: Restore Ccache cache | |
uses: actions/cache/restore@v4 | |
id: ccache-cache | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: ${{ github.job }}-ccache-${{ github.run_id }} | |
restore-keys: ${{ github.job }}-ccache- | |
- name: Generate build system | |
run: | | |
cmake -B build --preset ci-linux -DBoost_INCLUDE_DIR="${PWD}/${{ matrix.conf.boost_archive }}" | |
- name: Build | |
working-directory: build | |
run: | | |
cmake --build . -j $(nproc) | |
- name: Ccache stats | |
run: | | |
ccache --version | head -n 1 | |
ccache --show-stats | |
- name: Save Ccache cache | |
uses: actions/cache/save@v4 | |
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true' | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: ${{ github.job }}-ccache-${{ github.run_id }} | |
- name: Test | |
working-directory: build | |
run: | | |
ctest -j $(nproc) | |
- name: Install and run | |
run: | | |
cmake --install build --prefix install | |
tree install | |
./install/bin/bitcoind -version |