Skip to content

Commit

Permalink
ci: do not cache boost source tarball
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Mar 8, 2024
1 parent 5911bf1 commit 6191a0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 58 deletions.
29 changes: 6 additions & 23 deletions .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ on:
rime_plugins:
required: false
type: string

env:
boost_version: 1.84.0
BOOST_ROOT: ${{ github.workspace }}/deps/boost-1.84.0
RIME_PLUGINS: ${{ inputs.rime_plugins }}

jobs:
build:
runs-on: ${{ matrix.runs-on }}
Expand All @@ -21,10 +27,6 @@ jobs:
runs-on: [macos-13, macos-14]
include:
- { runs-on: macos-14, create-distributable: true }
env:
boost_version: 1.84.0
BOOST_ROOT: ${{ github.workspace }}/deps/boost-1.84.0
RIME_PLUGINS: ${{ inputs.rime_plugins }}
steps:
- name: Checkout last commit
uses: actions/checkout@v4
Expand All @@ -44,26 +46,7 @@ jobs:
run: |
echo BUILD_UNIVERSAL=1 >> $GITHUB_ENV
- name: Cache Boost
id: cache-boost
uses: actions/cache@v4
with:
path: |
${{ env.BOOST_ROOT }}.tar.xz
key: ${{ matrix.os }}-boost-${{ env.boost_version }}

- name: Extract Boost source tarball
if: steps.cache-boost.outputs.cache-hit == 'true'
run: |
pushd deps
tar -xJf ${{ env.BOOST_ROOT }}.tar.xz
cd ${{ env.BOOST_ROOT }}
./bootstrap.sh
./b2 headers
popd
- name: Install Boost
if: steps.cache-boost.outputs.cache-hit != 'true'
run: ./install-boost.sh

- name: Check submodules
Expand Down
37 changes: 2 additions & 35 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,8 @@ env:
RIME_PLUGINS: ${{ inputs.rime_plugins }}

jobs:
download-boost-src:
runs-on: windows-latest
steps:
- name: Cache Boost source
id: cache-boost-src
uses: actions/cache@v4
with:
path: |
${{ env.BOOST_ROOT }}.7z
key: ${{ runner.os }}-boost-${{ env.boost_version }}-src
lookup-only: true

- name: Download Boost source
if: steps.cache-boost-src.outputs.cache-hit != 'true'
run: |
aria2c https://github.com/boostorg/boost/releases/download/boost-${{ env.boost_version }}/boost-${{ env.boost_version }}.7z -d deps
build:
runs-on: windows-latest
needs: download-boost-src
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -84,23 +66,8 @@ jobs:
echo "git_ref_name=$git_ref_name" >> $env:GITHUB_ENV
git submodule > submodule-status
- name: Restore Boost source from cache
id: cache-boost-src
uses: actions/cache@v4
with:
path: |
${{ env.BOOST_ROOT }}.7z
key: ${{ runner.os }}-boost-${{ env.boost_version }}-src
fail-on-cache-miss: true

- name: Extract Boost source tarball
run: |
pushd deps
7z x ${{ env.BOOST_ROOT }}.7z
cd ${{ env.BOOST_ROOT }}
.\bootstrap.bat
.\b2 headers
popd
- name: Install boost
run: .\install-boost.bat

- name: Cache dependencies
id: cache-deps
Expand Down

0 comments on commit 6191a0f

Please sign in to comment.