xref: /libCEED/.github/workflows/julia-test-with-style.yml (revision d83b856e16e1a05ebd491d7f65187d3c08a4ff17)
1dfb8ed23Sjeremyltname: Julia
23446d1b5SJeremy L Thompson
33446d1b5SJeremy L Thompsonon:
43446d1b5SJeremy L Thompson  push:
53446d1b5SJeremy L Thompson
63446d1b5SJeremy L Thompsonjobs:
73446d1b5SJeremy L Thompson  test:
83446d1b5SJeremy L Thompson    strategy:
93446d1b5SJeremy L Thompson      matrix:
10b0ae8d51SJed Brown        os: [ubuntu-20.04]
113446d1b5SJeremy L Thompson        julia-version: ['1']
123446d1b5SJeremy L Thompson
133446d1b5SJeremy L Thompson    runs-on: ${{ matrix.os }}
143446d1b5SJeremy L Thompson
15*d83b856eSWill Pazner    env:
16*d83b856eSWill Pazner      # Set `JULIA_PKG_SERVER` to the empty string so that the registry will
17*d83b856eSWill Pazner      # be fetched using git instead of the package server (to avoid delays).
18*d83b856eSWill Pazner      JULIA_PKG_SERVER: ""
19*d83b856eSWill Pazner
203446d1b5SJeremy L Thompson    steps:
213446d1b5SJeremy L Thompson      - name: Environment setup
223446d1b5SJeremy L Thompson        uses: actions/checkout@v2
233446d1b5SJeremy L Thompson      - name: Julia setup
243446d1b5SJeremy L Thompson        uses: julia-actions/setup-julia@latest
253446d1b5SJeremy L Thompson        with:
263446d1b5SJeremy L Thompson          version: ${{ matrix.julia-version }}
273446d1b5SJeremy L Thompson      - name: Julia test and style
283446d1b5SJeremy L Thompson        run: |
293446d1b5SJeremy L Thompson          make info
303446d1b5SJeremy L Thompson          make -j2
313446d1b5SJeremy L Thompson          export JULIA_LIBCEED_LIB=$(find $PWD/lib -name "libceed.*")
323446d1b5SJeremy L Thompson          pushd julia/LibCEED.jl
3389430934SJed Brown          [[ "$GITHUB_REF" =~ ^refs/(heads/release|tags/).* ]] || julia --project -e 'import Pkg; Pkg.build(); Pkg.test("LibCEED"; coverage=true, test_args=["--run-dev-tests"])'
343446d1b5SJeremy L Thompson          unset JULIA_LIBCEED_LIB && julia --project -e 'import Pkg; Pkg.build(); Pkg.test("LibCEED")'
353446d1b5SJeremy L Thompson          julia --project=.style/ -e 'import Pkg; Pkg.instantiate()' && julia --project=.style/ .style/ceed_style.jl && git diff --exit-code src test examples
36