Skip to content

Commit 786689e

Browse files
Merge pull request #2614 from SciML/dw/compathelper
Update CompatHelper
2 parents 2d62c86 + b945333 commit 786689e

File tree

1 file changed

+36
-16
lines changed

1 file changed

+36
-16
lines changed

.github/workflows/CompatHelper.yml

+36-16
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,45 @@ name: CompatHelper
22

33
on:
44
schedule:
5-
- cron: '00 * * * *'
6-
issues:
7-
types: [opened, reopened]
5+
- cron: 0 0 * * *
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
811

912
jobs:
10-
build:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
matrix:
14-
julia-version: [1]
15-
julia-arch: [x86]
16-
os: [ubuntu-latest]
13+
CompatHelper:
14+
runs-on: ubuntu-latest
1715
steps:
18-
- uses: julia-actions/setup-julia@latest
16+
- name: Check if Julia is already available in the PATH
17+
id: julia_in_path
18+
run: which julia
19+
continue-on-error: true
20+
- name: Install Julia, but only if it is not already available in the PATH
21+
uses: julia-actions/setup-julia@v2
1922
with:
20-
version: ${{ matrix.julia-version }}
21-
- name: Pkg.add("CompatHelper")
22-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
23-
- name: CompatHelper.main()
23+
version: '1'
24+
arch: ${{ runner.arch }}
25+
if: steps.julia_in_path.outcome != 'success'
26+
- name: "Add the General registry via Git"
27+
run: |
28+
import Pkg
29+
ENV["JULIA_PKG_SERVER"] = ""
30+
Pkg.Registry.add("General")
31+
shell: julia --color=yes {0}
32+
- name: "Install CompatHelper"
33+
run: |
34+
import Pkg
35+
name = "CompatHelper"
36+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
37+
version = "3"
38+
Pkg.add(; name, uuid, version)
39+
shell: julia --color=yes {0}
40+
- name: "Run CompatHelper"
41+
run: |
42+
import CompatHelper
43+
CompatHelper.main(; subdirs=["", "docs", "test/downstream", "lib"])
44+
shell: julia --color=yes {0}
2445
env:
2546
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26-
run: julia -e 'using CompatHelper; CompatHelper.main(;subdirs=["", "docs", "test/downstream", "lib"])'

0 commit comments

Comments
 (0)