Skip to content

Commit

Permalink
Rearranges v8build so that checkout happens before ccache key generat…
Browse files Browse the repository at this point in the history
…ion.

... since it reads deps/v8_hash.
  • Loading branch information
tommie committed Dec 27, 2023
1 parent 39793c9 commit 7019a49
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/v8build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,13 @@ jobs:
platform: macos-latest
runs-on: ${{ matrix.platform }}
steps:
- name: Restore CCache
uses: actions/cache@v3
with:
path: ~/.ccache
key: libv8:ccache:${{ matrix.os }}:${{ matrix.arch }}:${{ hashFiles('deps/v8_hash') }}:${{ runner.os }}
restore-keys: |
libv8:ccache:${{ matrix.os }}:${{ matrix.arch }}:
${{ runner.os }}:${{ matrix.os }}:${{ matrix.arch }}:libv8:ccache
- name: Install g++-aarch64-linux-gnu
if: matrix.os == 'linux' && matrix.arch == 'arm64'
run: sudo apt update && sudo apt install g++-aarch64-linux-gnu -y

- name: Install setuptools
if: matrix.platform == 'macos-latest'
run: python3 -m ensurepip --default-pip && python3 -m pip install --upgrade setuptools

- name: Install CCache
if: matrix.platform == 'ubuntu-latest'
Expand All @@ -74,22 +73,6 @@ jobs:
echo "$(brew --prefix ccache)/libexec" >> "$GITHUB_PATH"
- name: Configure CCache
run: |
ccacheDir="$HOME/.ccache"
mkdir -p "$ccacheDir"
echo "CCACHE_DIR=$ccacheDir" >> "$GITHUB_ENV"
echo "CCACHE_CPP2=yes" >> "$GITHUB_ENV"
echo "CCACHE_SLOPPINESS=time_macros" >> "$GITHUB_ENV"
- name: Install g++-aarch64-linux-gnu
if: matrix.os == 'linux' && matrix.arch == 'arm64'
run: sudo apt update && sudo apt install g++-aarch64-linux-gnu -y

- name: Install setuptools
if: matrix.platform == 'macos-latest'
run: python3 -m ensurepip --default-pip && python3 -m pip install --upgrade setuptools

- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -104,6 +87,23 @@ jobs:
latest_v8_version="$(git tag --points-at "$latest_v8_hash" | head -n1)"
git checkout "${latest_v8_version:-$latest_v8_hash}"
- name: Configure CCache
run: |
ccacheDir="$HOME/.ccache"
mkdir -p "$ccacheDir"
echo "CCACHE_DIR=$ccacheDir" >> "$GITHUB_ENV"
echo "CCACHE_CPP2=yes" >> "$GITHUB_ENV"
echo "CCACHE_SLOPPINESS=time_macros" >> "$GITHUB_ENV"
- name: Restore CCache
uses: actions/cache@v3
with:
path: ~/.ccache
key: libv8:ccache:${{ matrix.os }}:${{ matrix.arch }}:${{ hashFiles('deps/v8_hash') }}:${{ runner.os }}
restore-keys: |
libv8:ccache:${{ matrix.os }}:${{ matrix.arch }}:
${{ runner.os }}:${{ matrix.os }}:${{ matrix.arch }}:libv8:ccache
- name: Restore V8 Build Cache
uses: actions/cache@v3
with:
Expand Down

0 comments on commit 7019a49

Please sign in to comment.