Skip to content

Commit 584f946

Browse files
authored
Improve GitHub Actions settings (#186)
* Install Dependabot * Update some workflows * Use `julia-actions/cache` * Colourful julia output
1 parent fc5524a commit 584f946

File tree

7 files changed

+33
-19
lines changed

7 files changed

+33
-19
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "weekly"

.github/workflows/CI.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
with:
5656
version: ${{ matrix.version }}
5757
arch: ${{ matrix.arch }}
58+
- uses: julia-actions/cache@v2
5859
- uses: actions/checkout@v4
5960
if: ${{ matrix.assertions }}
6061
with:
@@ -67,31 +68,21 @@ jobs:
6768
sed -i.bak 's/exit 2/exit 0/g' julia/deps/tools/jlchecksum
6869
make -C julia -j $(nproc) FORCE_ASSERTIONS=1 LLVM_ASSERTIONS=1 JULIA_PRECOMPILE=0
6970
echo $PWD/julia/usr/bin >> $GITHUB_PATH
70-
- uses: actions/cache@v4
71-
env:
72-
cache-name: cache-artifacts
73-
with:
74-
path: ~/.julia/artifacts
75-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
76-
restore-keys: |
77-
${{ runner.os }}-test-${{ env.cache-name }}-
78-
${{ runner.os }}-test-
79-
${{ runner.os }}-
8071
- name: Build libReactant
8172
if: ${{ matrix.libReactant == 'local' && matrix.os != 'macOS-latest'}}
8273
id: build_libreactant
8374
run: |
8475
python -m pip install numpy
85-
julia --project=deps -e 'using Pkg; Pkg.instantiate()'
86-
julia --project=deps deps/build_local.jl
76+
julia --color=yes --project=deps -e 'using Pkg; Pkg.instantiate()'
77+
julia --color=yes --project=deps deps/build_local.jl
8778
cp LocalPreferences.toml test/
8879
- name: Build libReactant MacOS
8980
if: ${{ matrix.libReactant == 'local' && matrix.os == 'macOS-latest'}}
9081
id: build_libreactant_mac
9182
run: |
9283
python -m pip install numpy
93-
julia --project=deps -e 'using Pkg; Pkg.instantiate()'
94-
SDKROOT=`xcrun --show-sdk-path` julia --project=deps deps/build_local.jl
84+
julia --color=yes --project=deps -e 'using Pkg; Pkg.instantiate()'
85+
SDKROOT=`xcrun --show-sdk-path` julia --color=yes --project=deps deps/build_local.jl
9586
cp LocalPreferences.toml test/
9687
- uses: julia-actions/julia-runtest@v1
9788
# if: steps.buildpkg.outcome == 'success'
@@ -113,20 +104,21 @@ jobs:
113104
- uses: julia-actions/setup-julia@v2
114105
with:
115106
version: '1'
107+
- uses: julia-actions/cache@v2
116108
- run: |
117-
julia --project=docs -e '
109+
julia --color=yes --project=docs -e '
118110
using Pkg
119111
Pkg.develop([PackageSpec(path=pwd()), PackageSpec("Reactant_jll")])
120112
Pkg.instantiate()'
121113
env:
122114
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: eager
123115
- run: |
124-
julia --project=docs -e '
116+
julia --color=yes --project=docs -e '
125117
using Documenter: DocMeta, doctest
126118
using Reactant
127119
DocMeta.setdocmeta!(Reactant, :DocTestSetup, :(using Reactant); recursive=true)
128120
doctest(Reactant)'
129-
- run: julia --project=docs docs/make.jl
121+
- run: julia --color=yes --project=docs docs/make.jl
130122
env:
131123
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
132124
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

.github/workflows/CompatHelper.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
version: '1'
2121
arch: ${{ runner.arch }}
2222
if: steps.julia_in_path.outcome != 'success'
23+
- uses: julia-actions/cache@v2
2324
- name: "Add the General registry via Git"
2425
run: |
2526
import Pkg

.github/workflows/benchmark_pr.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
permissions:
77
pull-requests: write
88

9+
concurrency:
10+
# Skip intermediate builds: always.
11+
# Cancel intermediate builds: always.
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
915
jobs:
1016
generate_plots:
1117
runs-on: ubuntu-latest

.github/workflows/format-check.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
tags: '*'
77
pull_request:
88

9+
concurrency:
10+
# Skip intermediate builds: always.
11+
# Cancel intermediate builds: always.
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
915
jobs:
1016
code-style:
1117
runs-on: ubuntu-latest

.github/workflows/format-pr.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ jobs:
1111
contents: write
1212
pull-requests: write
1313
steps:
14-
- uses: julia-actions/setup-julia@v1
14+
- uses: julia-actions/setup-julia@v2
1515
with:
1616
version: '1.10'
17+
- uses: julia-actions/cache@v2
1718
- uses: actions/checkout@v4
1819
with:
1920
ref: main

.github/workflows/regenerate-dialects.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ jobs:
1010
contents: write
1111
pull-requests: write
1212
steps:
13-
- uses: julia-actions/setup-julia@v1
13+
- uses: julia-actions/setup-julia@v2
1414
with:
1515
version: '1.10'
16+
- uses: julia-actions/cache@v2
1617
- uses: actions/checkout@v4
1718
with:
1819
ref: main

0 commit comments

Comments
 (0)