From 23a6dee5f6f72d1de0f9dcf94f2a5dd4461c08c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Thu, 13 Jun 2024 01:55:57 +0100 Subject: [PATCH] Update CI setup (#197) * Update CI setup * [CI] Delete drone setup Drone CI doesn't work anymore. --- .drone.jsonnet | 30 ----------- .drone.yml | 101 ----------------------------------- .github/dependabot.yml | 7 +++ .github/workflows/CI.yml | 46 +++++++--------- .github/workflows/TagBot.yml | 20 ++++++- 5 files changed, 43 insertions(+), 161 deletions(-) delete mode 100644 .drone.jsonnet delete mode 100644 .drone.yml create mode 100644 .github/dependabot.yml diff --git a/.drone.jsonnet b/.drone.jsonnet deleted file mode 100644 index 303196c..0000000 --- a/.drone.jsonnet +++ /dev/null @@ -1,30 +0,0 @@ -local Pipeline(os, arch, version, alpine=false) = { - kind: "pipeline", - name: os+" - "+arch+" - Julia "+version+(if alpine then " (Alpine)" else ""), - platform: { - os: os, - arch: arch - }, - steps: [ - { - name: "Run tests", - image: "julia:"+version+(if alpine then "-alpine" else ""), - commands: [ - "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true)'", - "julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.build()'", - "julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.test(coverage=true)'" - ] - } - ], - trigger: { - branch: ["master"] - } -}; - -[ - Pipeline("linux", "arm", "1.3.1"), - Pipeline("linux", "arm", "1.6.2"), - Pipeline("linux", "arm64", "1.3"), - Pipeline("linux", "arm64", "1.6"), - Pipeline("linux", "amd64", "1.6", true) -] diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 036204b..0000000 --- a/.drone.yml +++ /dev/null @@ -1,101 +0,0 @@ ---- -kind: pipeline -name: linux - arm - Julia 1.3.1 - -platform: - os: linux - arch: arm - -steps: -- name: Run tests - image: julia:1.3.1 - commands: - - "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true)'" - - "julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.build()'" - - "julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.test(coverage=true)'" - -trigger: - branch: - - master - ---- -kind: pipeline -name: linux - arm - Julia 1.6.2 - -platform: - os: linux - arch: arm - -steps: -- name: Run tests - image: julia:1.6.2 - commands: - - "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true)'" - - "julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.build()'" - - "julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.test(coverage=true)'" - -trigger: - branch: - - master - ---- -kind: pipeline -name: linux - arm64 - Julia 1.3 - -platform: - os: linux - arch: arm64 - -steps: -- name: Run tests - image: julia:1.3 - commands: - - "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true)'" - - "julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.build()'" - - "julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.test(coverage=true)'" - -trigger: - branch: - - master - ---- -kind: pipeline -name: linux - arm64 - Julia 1.6 - -platform: - os: linux - arch: arm64 - -steps: -- name: Run tests - image: julia:1.6 - commands: - - "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true)'" - - "julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.build()'" - - "julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.test(coverage=true)'" - -trigger: - branch: - - master - ---- -kind: pipeline -name: linux - amd64 - Julia 1.6 (Alpine) - -platform: - os: linux - arch: amd64 - -steps: -- name: Run tests - image: julia:1.6-alpine - commands: - - "julia --project=. --check-bounds=yes --color=yes -e 'using InteractiveUtils; versioninfo(verbose=true)'" - - "julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.build()'" - - "julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.test(coverage=true)'" - -trigger: - branch: - - master - -... diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..700707c --- /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: "weekly" diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 43c680b..69c7f95 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -6,6 +6,12 @@ on: tags: ["*"] pull_request: +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: always. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: test: name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} @@ -24,46 +30,30 @@ jobs: arch: - x64 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 }} - - name: Cache artifacts - uses: actions/cache@v2 - env: - cache-name: cache-artifacts + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v4 with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - - uses: julia-actions/julia-buildpkg@latest - - uses: julia-actions/julia-runtest@latest - - uses: julia-actions/julia-uploadcodecov@v0.1 + token: ${{ secrets.CODECOV_TOKEN }} + file: lcov.info continue-on-error: true docs: name: Documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: version: "1" - - name: Cache artifacts - uses: actions/cache@v2 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- - + - uses: julia-actions/cache@v2 - uses: julia-actions/julia-docdeploy@releases/v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index ae8c9c1..0cd3114 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -4,6 +4,22 @@ on: types: - created workflow_dispatch: + inputs: + lookback: + default: "3" +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read jobs: TagBot: if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' @@ -11,5 +27,5 @@ jobs: steps: - uses: JuliaRegistries/TagBot@v1 with: - ssh: ${{ secrets.DOCUMENTER_KEY }} - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} + ssh: ${{ secrets.DOCUMENTER_KEY }}