diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e24734af5..59ecd74c51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -280,12 +280,6 @@ jobs: CXX: c++ MACOSX_DEPLOYMENT_TARGET: 10.15 steps: - - name: Checkout - uses: actions/checkout@v3 - with: - submodules: true - # the default is to use a virtual merge commit between the PR and master: just use the PR - ref: ${{ github.event.pull_request.head.sha }} - name: Install Nix uses: DeterminateSystems/nix-installer-action@main if: runner.os == 'Linux' && !matrix.cmultilib @@ -311,6 +305,18 @@ jobs: sudo apt-get update sudo apt-get install -y gcc-multilib g++-multilib ccache if: matrix.cmultilib + - name: Checkout + uses: actions/checkout@v4 + with: + # the default is to use a virtual merge commit between the PR and master: just use the PR + ref: ${{ github.event.pull_request.head.sha }} + # Do check out some CI-relevant files from virtual merge commit to accommodate CI changes on + # master (as the workflow files themselves are always taken from the merge) + - name: CI Merge Checkout + run: | + git fetch origin ${{ github.event.pull_request.merge_commit_sha }} + git checkout FETCH_HEAD flake.nix flake.lock + if: github.event_name == 'pull_request' - name: Cache uses: actions/cache@v3 with: