From cf5ac0314bdaec431a95ee4ab926bedb96ed1c96 Mon Sep 17 00:00:00 2001 From: Seth R Johnson Date: Sat, 18 Nov 2023 10:59:40 -0500 Subject: [PATCH] Run as root see https://github.com/actions/checkout/issues/956 ``` Post job cleanup. /usr/bin/docker exec 8a93ca44215e080743610d80ccea33c624f5d3fce1aa4038cd018c06b13a75a6 sh -c "cat /etc/*release | grep ^ID" node:internal/fs/utils:347 throw err; ^ Error: EACCES: permission denied, open '/__w/_temp/_runner_file_commands/save_state_56877b46-0efb-448b-8122-6d4d35217f1e' at Object.openSync (node:fs:590:3) at Object.writeFileSync (node:fs:2202:35) at Object.appendFileSync (node:fs:2264:6) at Object.issueFileCommand (/__w/_actions/actions/checkout/v3/dist/index.js:2950:8) at Object.saveState (/__w/_actions/actions/checkout/v3/dist/index.js:2867:31) at Object.8647 (/__w/_actions/actions/checkout/v3/dist/index.js:2326:10) at __nccwpck_require__ (/__w/_actions/actions/checkout/v3/dist/index.js:18256:43) at Object.2565 (/__w/_actions/actions/checkout/v3/dist/index.js:146:34) at __nccwpck_require__ (/__w/_actions/actions/checkout/v3/dist/index.js:18256:43) at Object.9210 (/__w/_actions/actions/checkout/v3/dist/index.js:1141:36) { errno: -13, syscall: 'open', code: 'EACCES', path: '/__w/_temp/_runner_file_commands/save_state_56877b46-0efb-448b-8122-6d4d35217f1e' } ``` --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d446f2f38..e84217e02f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,12 +27,12 @@ jobs: # with: # clang-format-version: '17' ci: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: image: ['ubuntu-cuda'] - buildtype: ['debug'] geometry: ['orange'] + buildtype: ['debug'] special: [null] # image: ['ubuntu-cuda', 'centos-rocm'] # buildtype: ['debug', 'ndebug'] @@ -61,15 +61,31 @@ jobs: CELER_TEST_STRICT: 1 CMAKE_PRESET: >- ${{matrix.buildtype}}-${{matrix.geometry}}${{matrix.special && '-' || ''}}${{matrix.special}} - container: >- - docker.io/celeritas/${{ - matrix.image == 'ubuntu-cuda' && 'ci-jammy-cuda11:2023-03-13' - || matrix.image == 'centos-rocm' && 'ci-centos7-rocm5:2022-12-14.2' - || null - }} + container: + image: >- + docker.io/celeritas/${{ + matrix.image == 'ubuntu-cuda' && 'ci-jammy-cuda11:2023-03-13' + || matrix.image == 'centos-rocm' && 'ci-centos7-rocm5:2022-12-14.2' + || null + }} + # TODO: don't use a 'root' user + # See https://github.com/actions/checkout/issues/956 + options: --user root steps: + # TODO: use ccache + # - name: Cache ccache + # uses: actions/cache@v2 + # with: + # path: ${{ env.CCACHE_DIR }} + # key: ccache-${{ matrix.distro }}-${{github.run_id}} + # restore-keys: ccache-${{ matrix.distro }} + # - name: Zero ccache stats + # run: | + # ccache -z - name: Check out Celeritas uses: actions/checkout@v3 + with: + fetch-tags: true - name: Configure Celeritas run: | ln -fs scripts/cmake-presets/ci-${{matrix.image}}.json CMakeUserPresets.json