Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kimikage committed May 1, 2024
1 parent e69eee4 commit abfcded
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 65 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ name: CompatHelper
on:
schedule:
- cron: '00 00 * * *'
issues:
types: [opened, reopened]
workflow_dispatch:

jobs:
build:
CompatHelper:
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-latest
steps:
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
45 changes: 19 additions & 26 deletions .github/workflows/Documentations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,32 @@ on:
push:
branches:
- 'master'
- 'release-'
- 'release-*'
tags: '*'
release:
types: [published]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ["1"]
julia-arch: [x64]
os: [ubuntu-latest]
runs-on: ubuntu-latest
permissions:
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
contents: write
statuses: write
steps:
- uses: actions/checkout@v1.0.0
- uses: julia-actions/setup-julia@latest
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}
- name: Cache artifacts
uses: actions/cache@v1
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 }}-
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
version: '1'
- uses: julia-actions/cache@v1
- name: Configure doc environment
shell: julia --project=docs --color=yes {0}
run: |
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: julia --project=docs/ docs/make.jl
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
32 changes: 28 additions & 4 deletions .github/workflows/Invalidations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,45 @@ jobs:
if: github.base_ref == github.event.repository.default_branch
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: julia-actions/julia-buildpkg@v1
- name: Overwrite Package Version # FIXME
run: >
julia -e '
lines = readlines("Project.toml")
open("Project.toml", "w") do f
for l in lines
if l == "version = \"0.13.0-dev\""
l = "version = \"0.12.10\""
end
println(f, l)
end
end'
- uses: julia-actions/julia-invalidations@v1
id: invs_pr

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
- uses: julia-actions/julia-buildpkg@v1
- name: Overwrite Package Version # FIXME
run: >
julia -e '
lines = readlines("Project.toml")
open("Project.toml", "w") do f
for l in lines
if l == "version = \"0.13.0-dev\""
l = "version = \"0.12.10\""
end
println(f, l)
end
end'
- uses: julia-actions/julia-invalidations@v1
id: invs_default

- name: Report invalidation counts
run: |
echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:
inputs:
lookback:
default: 3
default: '3'
permissions:
actions: read
checks: read
Expand Down
68 changes: 37 additions & 31 deletions .github/workflows/UnitTest.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,53 @@
name: Unit test

on:
create:
tags:
push:
branches:
- master
- 'master'
- 'release-*'
tags: ['*']
pull_request:
schedule:
- cron: '20 00 1 * *'

workflow_dispatch:
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:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created
actions: write
contents: read
strategy:
matrix:
julia-version: ['1.0', '1', 'nightly']
os: [ubuntu-latest, windows-latest, macOS-latest]
fail-fast: false

matrix:
julia-version: ['1.0', '1.6', '1', 'nightly']
os: [ubuntu-latest, windows-latest, macos-13]
julia-arch: [x64]
include:
- os: ubuntu-latest # only test one 32-bit job
julia-version: '1'
julia-arch: x86
- os: macos-latest
julia-version: '1'
julia-arch: aarch64
- os: macos-latest
julia-version: 'nightly'
julia-arch: aarch64
steps:
- uses: actions/checkout@v2
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}

- name: Cache artifacts
uses: actions/cache@v1
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 }}-
- name: "Unit Test"
uses: julia-actions/julia-runtest@master

arch: ${{ matrix.julia-arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v4
with:
file: lcov.info
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit abfcded

Please sign in to comment.