forked from CEED/libCEED
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.34 KB
/
julia-test-with-style.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Julia
on:
push:
branches:
- main
pull_request:
jobs:
test:
strategy:
matrix:
os: [ubuntu-24.04]
julia-version: ['1']
runs-on: ${{ matrix.os }}
env:
# Set `JULIA_PKG_SERVER` to the empty string so that the registry will
# be fetched using git instead of the package server (to avoid delays).
JULIA_PKG_SERVER: ""
steps:
- name: Environment setup
uses: actions/checkout@v4
- name: Julia setup
uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- name: Julia test and style
run: |
make info
make -j2
LIBCEED_LIB=$(find $PWD/lib -name "libceed.*")
pushd julia/LibCEED.jl
echo >> test/Project.toml
echo "[preferences.libCEED_jll]" >> test/Project.toml
echo "libceed_path = \"$LIBCEED_LIB\"" >> test/Project.toml
[[ "$GITHUB_REF" =~ ^refs/(heads/release|tags/).* ]] || julia --project -e 'import Pkg; Pkg.test("LibCEED"; coverage=true, test_args=["--run-dev-tests"])'
git checkout test/Project.toml && julia --project -e 'import Pkg; Pkg.test("LibCEED")'
julia --project=.style/ -e 'import Pkg; Pkg.instantiate()' && julia --project=.style/ .style/ceed_style.jl && git diff --exit-code src test examples