Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Actions CI #179

Merged
merged 2 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 38 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,38 @@ jobs:
git config --global pack.threads 0
! command -v cmake &> /dev/null || echo "B2_FLAGS=--nowide-enable-cmake" >> $GITHUB_ENV

if [[ "${{matrix.container}}" == "ubuntu:16.04" ]] || [[ "${{matrix.container}}" == "ubuntu:18.04" ]]; then
# Ubuntu 16/18 can't run Node 20, so stick to older actions: https://github.com/actions/checkout/issues/1590
echo "GHA_USE_NODE_20=false" >> $GITHUB_ENV
else
echo "GHA_USE_NODE_20=true" >> $GITHUB_ENV
fi

- uses: actions/checkout@v3
if: env.GHA_USE_NODE_20 == 'false'
with:
# For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary'
fetch-depth: ${{ matrix.coverage && '0' || '1' }}

- uses: actions/checkout@v4
if: env.GHA_USE_NODE_20 == 'true'
with:
# For coverage builds fetch the whole history, else only 1 commit using a 'fake ternary'
fetch-depth: ${{ matrix.coverage && '0' || '1' }}

- name: Cache ccache
uses: actions/cache@v3
if: env.B2_USE_CCACHE
if: env.B2_USE_CCACHE && env.GHA_USE_NODE_20 == 'false'
with:
path: ~/.ccache
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}}
restore-keys: |
${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-
${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}

- name: Cache ccache
uses: actions/cache@v4
if: env.B2_USE_CCACHE && env.GHA_USE_NODE_20 == 'true'
with:
path: ~/.ccache
key: ${{matrix.os}}-${{matrix.container}}-${{matrix.compiler}}-${{github.sha}}
Expand All @@ -136,6 +160,15 @@ jobs:

- name: Fetch Boost.CI
uses: actions/checkout@v3
if: env.GHA_USE_NODE_20 == 'false'
with:
repository: boostorg/boost-ci
ref: master
path: boost-ci-cloned

- name: Fetch Boost.CI
uses: actions/checkout@v4
if: env.GHA_USE_NODE_20 == 'true'
with:
repository: boostorg/boost-ci
ref: master
Expand Down Expand Up @@ -260,7 +293,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup MSYS2 environment
uses: msys2/setup-msys2@v2
Expand All @@ -271,7 +304,7 @@ jobs:
pacboy: gcc:p cmake:p ninja:p

- name: Fetch Boost.CI
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: boostorg/boost-ci
ref: master
Expand Down Expand Up @@ -320,9 +353,9 @@ jobs:
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Fetch Boost.CI
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: boostorg/boost-ci
ref: master
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
DEP_DIR: ${{github.workspace}}/dependencies
BOOST_VERSION: 1.56.0
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Sanity check version
run: grep -E 'set\(_version [0-9]' CMakeLists.txt
- uses: actions/cache@v1
- uses: actions/cache@v4
id: cache-boost
with:
path: ${{env.DEP_DIR}}
Expand All @@ -64,7 +64,7 @@ jobs:
if: matrix.standalone == 'Boost'
run: echo "BOOST_ROOT=${DEP_DIR//\\/\/}/boost_${BOOST_VERSION//./_}" >> $GITHUB_ENV
# Install Boost
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: matrix.standalone == 'Boost' && steps.cache-boost.outputs.cache-hit != 'true'
with:
repository: boostorg/boost
Expand Down Expand Up @@ -125,7 +125,7 @@ jobs:
CreateDocuTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Create documentation
run: |
sudo apt-get install -y doxygen
Expand All @@ -134,9 +134,9 @@ jobs:
CreateBoostDocuTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Fetch Boost.CI
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: boostorg/boost-ci
ref: master
Expand All @@ -153,7 +153,7 @@ jobs:
CheckFormatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: DoozyX/[email protected]
with:
exclude: './doc'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
DEP_DIR: ${{github.workspace}}/dependencies
BOOST_VERSION: 1.56.0
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Extract tag name
id: get_tag
run: |
Expand Down
Loading