name: setup-ci description: Prepare common tools and environment shared by CI jobs. runs: using: composite steps: # TODO(anp): Move this under CI_BUILD_ROOT once all consumers use the # shared build-path contract. - name: Configure Cargo target directory shell: bash run: echo "CARGO_TARGET_DIR=${CARGO_TARGET_DIR:-$GITHUB_WORKSPACE/codex-rs/target}" >> "$GITHUB_ENV" - name: Prefer the Git CLI for Cargo git dependencies shell: bash run: echo "CARGO_NET_GIT_FETCH_WITH_CLI=true" >> "$GITHUB_ENV" - name: Install DotSlash uses: facebook/install-dotslash@1e4e7b3e07eaca387acb98f1d4720e0bee8dbb6a # v2 - name: Install just uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2.62.49 with: tool: just@1.51.0 # Some integration tests spawn DotSlash from a stable system path rather # than inheriting the action-local PATH entry. - name: Make DotSlash available in PATH (Unix) if: runner.os != 'Windows' shell: bash run: | if [[ -w /usr/local/bin ]]; then cp "$(which dotslash)" /usr/local/bin else sudo cp "$(which dotslash)" /usr/local/bin fi - name: Make DotSlash available in PATH (Windows) if: runner.os == 'Windows' shell: pwsh run: Copy-Item (Get-Command dotslash).Source -Destination "$env:LOCALAPPDATA\Microsoft\WindowsApps\dotslash.exe" - name: Enable Git long paths (Windows) if: runner.os == 'Windows' shell: pwsh run: git config --global core.longpaths true