Skip to content

Commit

Permalink
Update GitHub workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
michakraus committed Nov 7, 2024
1 parent 44dbae9 commit a8c3639
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 36 deletions.
55 changes: 38 additions & 17 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,61 @@
name: CI
on:
- push
- pull_request
push:
branches:
- main
tags: ['*']
pull_request:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
version:
- '1.4'
- '1.5'
- 'nightly'
- '1.6'
- '1.10'
- '^1.11.0-0'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
experimental: [false]
include:
- version: 'nightly'
os: ubuntu-latest
arch: x64
experimental: true
- version: 'nightly'
os: macOS-latest
arch: x64
experimental: true
- version: 'nightly'
os: windows-latest
arch: x64
experimental: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: Set environment variables
run: echo "JULIA_NUM_THREADS=2" >> $GITHUB_ENV
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-uploadcodecov@latest
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: lcov.info
9 changes: 3 additions & 6 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
name: CompatHelper

on:
schedule:
- cron: '00 00 * * *'

- cron: 0 0 * * *
workflow_dispatch:
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
with:
version: 1.5
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
39 changes: 26 additions & 13 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,38 @@
name: Documentation

on:
push:
branches:
- master
- main
tags: '*'
pull_request:

jobs:
jobs:
build:
name: Documentation
runs-on: ubuntu-latest
permissions:
contents: write
statuses: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@latest
with:
version: 1.5
- name: Set environment variables
run: echo "PYTHON=''" >> $GITHUB_ENV
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate(); Pkg.build(); Pkg.precompile();'
- name: Build and deploy Documentation
run: julia --project=docs/ docs/make.jl
- name: Configure doc environment
run: |
julia --project=docs/ -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
Pkg.build()
Pkg.precompile()'
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
GKSwstype: 100
- name: Doctests
run: |
julia --project=docs -e '
using Documenter: DocMeta, doctest
using ElectromagneticFields
DocMeta.setdocmeta!(ElectromagneticFields, :DocTestSetup, :(using ElectromagneticFields); recursive=true)
doctest(ElectromagneticFields)'
14 changes: 14 additions & 0 deletions .github/workflows/Register.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Register Package
on:
workflow_dispatch:
inputs:
version:
description: Version to register or component to bump
required: true
jobs:
register:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/RegisterAction@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a8c3639

Please sign in to comment.