From d542ac3bb88f242dea1a46a1610c1019c7787c70 Mon Sep 17 00:00:00 2001 From: Beforerr Date: Fri, 25 Sep 2026 14:03:39 -0600 Subject: [PATCH] ci: install R directly; pin Julia pkgimage CPU target; use preinstalled Go setup-r also installs R CMD check extras (apt sysreqs on Linux, Fortran and macOS utils on macOS) that the tests don't need. Linux uses distro r-base-core (4.3.3); Posit's release .deb pulls -dev deps and was ~4x slower. x64 runners vary in CPU; native pkgimages restored from cache were rejected on a different CPU, recompiling Revise (~25s) on a random job each run. Pin JULIA_CPU_TARGET=x86-64-v3 there. go-version '>=1.25' matches the runner's preinstalled Go instead of downloading 'stable' when the image lags. Grant actions: write so julia-actions/cache can delete superseded caches. Claude-Session: https://claude.ai/code/session_01WaXpaZH42vRSyuuvDQ9hFk --- .github/workflows/test.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2ccdce9..cc029c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,17 +12,29 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} + permissions: + actions: write # julia-actions/cache deletes superseded caches + contents: read + env: + JULIA_CPU_TARGET: ${{ matrix.os == 'macos-latest' && 'native' || 'x86-64-v3' }} steps: - uses: actions/checkout@v7 - uses: actions/setup-go@v5 with: - go-version: stable + go-version: '>=1.25' cache-dependency-path: go.sum - uses: julia-actions/setup-julia@v2 - uses: julia-actions/cache@v3 - - uses: r-lib/actions/setup-r@v2 - if: runner.os != 'Windows' - # windows-latest ships R; setup-r would reinstall it plus Ghostscript (~30s). + # Not setup-r: it adds R CMD check extras (Linux sysreqs, macOS Fortran, Windows Ghostscript) + - if: runner.os == 'Linux' + run: | + install() { sudo apt-get install -y -qq --no-install-recommends r-base-core; } + install || { sudo apt-get update -qq && install; } + - if: runner.os == 'macOS' + run: | + curl -fsSLo "$RUNNER_TEMP/R.pkg" "$(curl -fsSL "https://api.r-hub.io/rversions/resolve/release/macos/$(uname -m)" | jq -r .url)" + sudo installer -pkg "$RUNNER_TEMP/R.pkg" -target / + # windows-latest ships R. - if: runner.os == 'Windows' shell: bash run: cygpath -w "$(ls -d /c/Program\ Files/R/R-*/bin | tail -1)" >> "$GITHUB_PATH"