From 47b212ab2eb9ec3fe804ce5b181a6de2b257be4e Mon Sep 17 00:00:00 2001 From: David Widmann Date: Sun, 6 Oct 2024 13:04:54 +0200 Subject: [PATCH] Update GH actions and add dependabot (#377) * Update GH actions and add dependabot * Update Julia compat (tests pass with 1.6.7?) --- .github/dependabot.yml | 7 +++++ .github/workflows/CI.yml | 37 ++++++++++++------------- .github/workflows/ExperimentalTests.yml | 27 ++++++++++-------- .github/workflows/Format.yml | 5 ++-- .github/workflows/IntegrationTests.yml | 27 ++++++++++-------- .github/workflows/documentation.yml | 9 +++--- Project.toml | 2 +- 7 files changed, 63 insertions(+), 51 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..d60f0707 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" # Location of package manifests + schedule: + interval: "monthly" diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 65d899c9..1484ec36 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -6,42 +6,41 @@ on: - master pull_request: +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + jobs: test: + # needed to allow julia-actions/cache to delete old caches that it has created + permissions: + actions: write + contents: read runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.version == 'nightly' }} + continue-on-error: ${{ matrix.version == 'pre' }} strategy: matrix: version: - - '1.6' + - 'min' - '1' - - 'nightly' + - 'pre' os: - ubuntu-latest - macOS-latest - windows-latest arch: - - x86 - x64 - exclude: - - os: ubuntu-latest - arch: x86 - - os: macOS-latest - arch: x86 - - os: windows-latest - arch: x86 - # GitHub Action seems to have issue of running julia-nightly with windows-latest - # TODO Revisit in the future - - version: 'nightly' - os: windows-latest steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: julia-actions/julia-buildpkg@latest + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 - name: Run tests - uses: julia-actions/julia-runtest@latest + uses: julia-actions/julia-runtest@v1 env: AHMC_TEST_GROUP: AdvancedHMC diff --git a/.github/workflows/ExperimentalTests.yml b/.github/workflows/ExperimentalTests.yml index 49ed1e77..a605107f 100644 --- a/.github/workflows/ExperimentalTests.yml +++ b/.github/workflows/ExperimentalTests.yml @@ -6,8 +6,18 @@ on: - master pull_request: +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + jobs: test: + # needed to allow julia-actions/cache to delete old caches that it has created + permissions: + actions: write + contents: read runs-on: ${{ matrix.os }} strategy: matrix: @@ -18,23 +28,16 @@ jobs: - macOS-latest - windows-latest arch: - - x86 - x64 - exclude: - - os: ubuntu-latest - arch: x86 - - os: macOS-latest - arch: x86 - - os: windows-latest - arch: x86 steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: julia-actions/julia-buildpkg@latest + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 - name: Run integration tests - uses: julia-actions/julia-runtest@latest + uses: julia-actions/julia-runtest@v1 env: AHMC_TEST_GROUP: Experimental diff --git a/.github/workflows/Format.yml b/.github/workflows/Format.yml index 5bdaf949..0137f5e8 100644 --- a/.github/workflows/Format.yml +++ b/.github/workflows/Format.yml @@ -5,7 +5,6 @@ on: push: branches: - master - - main concurrency: # Skip intermediate builds: always. @@ -17,8 +16,8 @@ jobs: format: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@latest + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: version: 1 - name: Format code diff --git a/.github/workflows/IntegrationTests.yml b/.github/workflows/IntegrationTests.yml index 1eb8053a..383c91d4 100644 --- a/.github/workflows/IntegrationTests.yml +++ b/.github/workflows/IntegrationTests.yml @@ -6,8 +6,18 @@ on: - master pull_request: +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} + jobs: test: + # needed to allow julia-actions/cache to delete old caches that it has created + permissions: + actions: write + contents: read runs-on: ${{ matrix.os }} strategy: matrix: @@ -18,23 +28,16 @@ jobs: - macOS-latest - windows-latest arch: - - x86 - x64 - exclude: - - os: ubuntu-latest - arch: x86 - - os: macOS-latest - arch: x86 - - os: windows-latest - arch: x86 steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: julia-actions/julia-buildpkg@latest + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 - name: Run integration tests - uses: julia-actions/julia-runtest@latest + uses: julia-actions/julia-runtest@v1 env: AHMC_TEST_GROUP: Downstream diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index b8701c9b..b8652f3f 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -9,12 +9,14 @@ on: jobs: build: + permissions: + statuses: write # Used to report documentation build statuses runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@latest + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: - version: '1.7' + version: '1' - name: Install dependencies run: julia --project=docs/ -e ' using Pkg; @@ -24,4 +26,3 @@ jobs: env: DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key run: julia --project=docs/ docs/make.jl - diff --git a/Project.toml b/Project.toml index a3c51910..fa49a335 100644 --- a/Project.toml +++ b/Project.toml @@ -48,7 +48,7 @@ StatsBase = "0.31, 0.32, 0.33, 0.34" StatsFuns = "0.8, 0.9, 1" LinearAlgebra = "1.6" Random = "1.6" -julia = "1.6" +julia = "1.6.7" [extras] CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"