From 43e2588aa2c9936a66b971fbbf5d51af6fb73c33 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Fri, 8 Mar 2024 16:32:06 +0200 Subject: [PATCH] ci: Try `hg` and then try `git` to download NSPR and NSS (#1726) * ci: Try `hg` and then try `git` to download NSPR and NSS Because on the bencher, `git` now has issues. You can't win. * Install hg * Debug * Debug more * And again * Undebug --- .github/actions/nss/action.yml | 31 +++++++++++++++++++++++-------- .github/workflows/check.yml | 4 ++-- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/actions/nss/action.yml b/.github/actions/nss/action.yml index 23d9bd3f8f..23232ebc13 100644 --- a/.github/actions/nss/action.yml +++ b/.github/actions/nss/action.yml @@ -16,17 +16,32 @@ inputs: runs: using: composite steps: + # Ideally, we'd use this. But things are sufficiently flaky that we're better off + # trying both hg and git. Leaving this here in case we want to re-try in the future. + # + # - name: Checkout NSPR + # uses: actions/checkout@v4 + # with: + # repository: "nss-dev/nspr" + # path: ${{ github.workspace }}/nspr + + # - name: Checkout NSS + # uses: actions/checkout@v4 + # with: + # repository: "nss-dev/nss" + # path: ${{ github.workspace }}/nss + - name: Checkout NSPR - uses: actions/checkout@v4 - with: - repository: "nss-dev/nspr" - path: ${{ github.workspace }}/nspr + shell: bash + run: | + hg clone https://hg.mozilla.org/projects/nspr "${{ github.workspace }}/nspr" || \ + git clone --depth=1 https://github.com/nss-dev/nspr "${{ github.workspace }}/nspr" - name: Checkout NSS - uses: actions/checkout@v4 - with: - repository: "nss-dev/nss" - path: ${{ github.workspace }}/nss + shell: bash + run: | + hg clone https://hg.mozilla.org/projects/nss "${{ github.workspace }}/nss" || \ + git clone --depth=1 https://github.com/nss-dev/nss "${{ github.workspace }}/nss" - name: Build shell: bash diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5faa67bef9..2a110e22b1 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -46,7 +46,7 @@ jobs: env: DEBIAN_FRONTEND: noninteractive run: | - sudo apt-get install -y --no-install-recommends gyp ninja-build lld + sudo apt-get install -y --no-install-recommends gyp mercurial ninja-build lld echo "RUSTFLAGS=-C link-arg=-fuse-ld=lld" >> "$GITHUB_ENV" # In addition to installing dependencies, first make sure System Integrity Protection (SIP) @@ -58,7 +58,7 @@ jobs: if: runner.os == 'MacOS' run: | csrutil status | grep disabled - brew install ninja llvm + brew install ninja mercurial llvm echo "/opt/homebrew/opt/llvm/bin" >> "$GITHUB_PATH" ln -s /opt/homebrew/bin/python3 /opt/homebrew/bin/python # python3 -m pip install gyp-next