Skip to content

Commit 7310e7b

Browse files
authored
Update workflows (#299)
1 parent cab78d7 commit 7310e7b

File tree

5 files changed

+176
-27
lines changed

5 files changed

+176
-27
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/Invalidations.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Invalidations
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
# Skip intermediate builds: always.
8+
# Cancel intermediate builds: always.
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
evaluate:
14+
# Only run on PRs to the default branch.
15+
# In the PR trigger above branches can be specified only explicitly whereas this check should work for master, main, or any other default branch
16+
if: github.base_ref == github.event.repository.default_branch
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: julia-actions/setup-julia@v2
20+
with:
21+
version: '1'
22+
- uses: actions/checkout@v4
23+
- uses: julia-actions/julia-buildpkg@v1
24+
- name: Overwrite Package Version # FIXME
25+
run: >
26+
julia -e '
27+
lines = readlines("Project.toml")
28+
open("Project.toml", "w") do f
29+
for l in lines
30+
if l == "version = \"0.9.0-dev\""
31+
l = "version = \"0.8.4\""
32+
end
33+
println(f, l)
34+
end
35+
end'
36+
- uses: julia-actions/julia-invalidations@v1
37+
id: invs_pr
38+
39+
- uses: actions/checkout@v4
40+
with:
41+
ref: ${{ github.event.repository.default_branch }}
42+
- uses: julia-actions/julia-buildpkg@v1
43+
- name: Overwrite Package Version # FIXME
44+
run: >
45+
julia -e '
46+
lines = readlines("Project.toml")
47+
open("Project.toml", "w") do f
48+
for l in lines
49+
if l == "version = \"0.9.0-dev\""
50+
l = "version = \"0.8.4\""
51+
end
52+
println(f, l)
53+
end
54+
end'
55+
- uses: julia-actions/julia-invalidations@v1
56+
id: invs_default
57+
58+
- name: Report invalidation counts
59+
run: |
60+
echo "Invalidations on default branch: ${{ steps.invs_default.outputs.total }} (${{ steps.invs_default.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
61+
echo "This branch: ${{ steps.invs_pr.outputs.total }} (${{ steps.invs_pr.outputs.deps }} via deps)" >> $GITHUB_STEP_SUMMARY
62+
- name: Check if the PR does increase number of invalidations
63+
if: steps.invs_pr.outputs.total > steps.invs_default.outputs.total
64+
run: exit 1

.github/workflows/TagBot.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
name: TagBot
22
on:
3-
schedule:
4-
- cron: 0 * * * *
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
inputs:
8+
lookback:
9+
default: 3
10+
permissions:
11+
contents: write
512
jobs:
613
TagBot:
14+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
715
runs-on: ubuntu-latest
816
steps:
917
- uses: JuliaRegistries/TagBot@v1

.github/workflows/UnitTest.yml

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,49 @@
11
name: Unit test
22

33
on:
4-
create:
5-
tags:
64
push:
75
branches:
86
- master
7+
- release-*
8+
tags: ['*']
99
pull_request:
10-
schedule:
11-
- cron: '20 00 1 * *'
10+
workflow_dispatch:
1211

1312
jobs:
1413
test:
1514
runs-on: ${{ matrix.os }}
1615
strategy:
1716
fail-fast: false
1817
matrix:
19-
julia-version: ['1.0', '1', 'nightly']
20-
os: [ubuntu-latest, windows-latest, macOS-latest]
18+
julia-version: ['1.0', '1.6', '1', 'nightly']
19+
os: [ubuntu-latest, windows-latest, macos-13]
2120
julia-arch: [x64]
22-
# only test one 32-bit job
2321
include:
24-
- os: ubuntu-latest
22+
- os: ubuntu-latest # only test one 32-bit job
2523
julia-version: '1'
2624
julia-arch: x86
25+
- os: macos-latest
26+
julia-version: '1'
27+
julia-arch: aarch64
28+
- os: macos-latest
29+
julia-version: 'nightly'
30+
julia-arch: aarch64
2731

2832
steps:
29-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v4
3034
- name: "Set up Julia"
31-
uses: julia-actions/setup-julia@v1
35+
uses: julia-actions/setup-julia@v2
3236
with:
3337
version: ${{ matrix.julia-version }}
3438
arch: ${{ matrix.julia-arch }}
35-
3639
- name: Cache artifacts
37-
uses: actions/cache@v1
38-
env:
39-
cache-name: cache-artifacts
40-
with:
41-
path: ~/.julia/artifacts
42-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
43-
restore-keys: |
44-
${{ runner.os }}-test-${{ env.cache-name }}-
45-
${{ runner.os }}-test-
46-
${{ runner.os }}-
40+
uses: julia-actions/cache@v2
4741
- name: "Unit Test"
48-
uses: julia-actions/julia-runtest@master
42+
uses: julia-actions/julia-runtest@v1
4943

5044
- uses: julia-actions/julia-processcoverage@v1
51-
- uses: codecov/codecov-action@v1
45+
- uses: codecov/codecov-action@v4
5246
with:
47+
token: ${{ secrets.CODECOV_TOKEN }} # required
48+
fail_ci_if_error: true
5349
file: lcov.info
54-
55-

.github/workflows/UnitTestArm.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Unit test for Arm
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- release-*
8+
tags: ['*']
9+
pull_request:
10+
workflow_dispatch:
11+
permissions:
12+
actions: write
13+
contents: read
14+
jobs:
15+
test:
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
julia-version: ['1.0', '1.6', '1', 'nightly']
21+
os: [ubuntu-latest]
22+
distro: [ubuntu_latest]
23+
arch: [aarch64]
24+
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: julia-actions/setup-julia@v2
28+
with:
29+
version: ${{ matrix.julia-version }}
30+
- uses: julia-actions/cache@v2
31+
- name: Download Julia Binary
32+
run: >
33+
julia -e '
34+
using Pkg; Pkg.add("JSON"); using JSON;
35+
if "${{ matrix.julia-version }}" == "nightly";
36+
url = "https://julialangnightlies-s3.julialang.org/bin/linux/${{ matrix.arch }}/julia-latest-linux-${{ matrix.arch }}.tar.gz";
37+
else;
38+
path = download("https://julialang-s3.julialang.org/bin/versions.json");
39+
json = JSON.parsefile(path);
40+
try rm(path) catch end;
41+
vspec = Pkg.Types.VersionSpec("${{ matrix.julia-version }}");
42+
a(f) = f["arch"] == "${{ matrix.arch }}" && f["os"] == "linux" && !occursin("musl", f["triplet"]);
43+
m = filter(json) do v; vn = VersionNumber(v[1]); vn in vspec && isempty(vn.prerelease) && any(a, v[2]["files"]); end;
44+
v = sort(VersionNumber.(keys(m)))[end];
45+
url = filter(a, json[string(v)]["files"])[1]["url"];
46+
end;
47+
download(url, "/tmp/julia-aarch64.tar.gz");'
48+
49+
- name: Extract Julia Files
50+
run: |
51+
mkdir -p /home/runner/work/julia/
52+
tar -xf /tmp/julia-aarch64.tar.gz --strip-components=1 -C /home/runner/work/julia/
53+
rm /tmp/julia-aarch64.tar.gz
54+
55+
- uses: uraimo/[email protected]
56+
name: Unit Test
57+
with:
58+
arch: ${{ matrix.arch }}
59+
distro: ${{ matrix.distro }}
60+
dockerRunArgs: |
61+
-v "/home/runner/work/julia:/home/runner/work/julia"
62+
-v "/home/runner/.julia/registries:/root/.julia/registries"
63+
--net=host
64+
install: |
65+
ln -s /home/runner/work/julia/bin/julia /usr/local/bin/julia
66+
echo /home/runner/work/julia/lib > /etc/ld.so.conf.d/julia.conf
67+
mkdir -p /root/.julia/registries/General
68+
run: |
69+
julia --compile=min -O0 -e 'using InteractiveUtils; versioninfo();'
70+
julia --project=. --check-bounds=yes --color=yes -e 'using Pkg; Pkg.build(); Pkg.test(coverage=true)'
71+
- uses: julia-actions/julia-processcoverage@v1
72+
- uses: codecov/codecov-action@v4
73+
with:
74+
token: ${{ secrets.CODECOV_TOKEN }} # required
75+
fail_ci_if_error: true
76+
file: lcov.info

0 commit comments

Comments
 (0)