From 6191a0ff5ec4675cf4fc6a90dde25f1c2ff6f0ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=85=E6=88=8E=E6=B0=8F?= Date: Fri, 8 Mar 2024 12:45:13 +0800 Subject: [PATCH] ci: do not cache boost source tarball --- .github/workflows/macos-build.yml | 29 +++++----------------- .github/workflows/windows-build.yml | 37 ++--------------------------- 2 files changed, 8 insertions(+), 58 deletions(-) diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml index a16e109252..b85aef3f8a 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -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 }} @@ -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 @@ -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 diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 9d0bdaeef4..4e41565ae7 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -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: @@ -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