Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
huiyuxie committed Nov 20, 2024
1 parent f9b56c6 commit b0e6532
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
interval: "monthly"
54 changes: 31 additions & 23 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,60 @@ on:
push:
branches:
- main
tags: ["*"]
tags: '*' # Enable workflow for any tag pushes
paths-ignore:
- "LICENSE"
- "README.md"
- "docs/**"
- 'LICENSE'
- 'README.md'
- 'docs/**'
pull_request:
paths-ignore:
- "LICENSE"
- "README.md"
- "docs/**"
- 'LICENSE'
- 'README.md'
- 'docs/**'
workflow_dispatch:

# Cancel concurrent CI tests
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/') }}
cancel-in-progress: true

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- "1.10"
- '1.10'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
# Failed to precompile Trixi Julia 1.10 - windows-latest - x86
# No binaries for Julia 1.10 - macOS-latest - x86
# - x86
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up Julia
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
file: lcov.info

- name: Display Julia Version Info
run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)'

- name: Cache Julia Packages
uses: julia-actions/cache@v2

- name: Build Julia Package
uses: julia-actions/julia-buildpkg@v1

# Note that only basic or placeholder tests can run on remote CI machines now
# CUDA tests requiring GPU setups must be run using JuliaGPU Buildkite
# TODO: Move tests to JuliaGPU Buildkite
- name: Test Julia Package
uses: julia-actions/julia-runtest@v1
12 changes: 8 additions & 4 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
name: CompatHelper
name: Compat Helper

on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:

jobs:
CompatHelper:
compat-helper:
name: Run Compat Helper
runs-on: ubuntu-latest
steps:
- name: Pkg.add("CompatHelper")
- name: Add CompatHelper Package
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()

- name: Run CompatHelper to Update Dependencies
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Documentation
on:
push:
branches:
- main # update to match your development branch (master, main, dev, trunk, ...)
tags: "*"
- main # update to match your development branch
tags: '*'
pull_request:

jobs:
Expand All @@ -16,14 +16,21 @@ jobs:
statuses: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set Up Julia
uses: julia-actions/setup-julia@v2
with:
version: "1.10"
- uses: julia-actions/cache@v2
- name: Install dependencies
version: '1.10'

- name: Cache Julia Dependencies
uses: julia-actions/cache@v2

- name: Install Dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy

- name: Build and Deploy Documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
Expand Down
41 changes: 12 additions & 29 deletions .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,21 @@
name: format-check
name: Format Check

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

jobs:
check-format:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1]
julia-arch: [x86]
os: [ubuntu-latest]
format-suggestions:
name: Check and Suggest Code Format
runs-on: ubuntu-latest
steps:
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- name: Checkout Repository
uses: actions/checkout@v4

- uses: actions/checkout@v4
- name: Install JuliaFormatter and format
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.56"))'
julia -e 'using JuliaFormatter; format(["examples", "src", "test", "utils"])'
- name: Format check
run: |
julia -e '
out = Cmd(`git diff --name-only`) |> read |> String
if out == ""
exit(0)
else
@error "Some files have not been formatted !!!"
write(stdout, out)
exit(1)
end'
- name: Run Julia Format Check
uses: julia-actions/julia-format@v3
with:
version: '1.0.56'
9 changes: 5 additions & 4 deletions .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ on: [push, pull_request, workflow_dispatch]

jobs:
typos-check:
name: Spell Check with Typos
name: Run Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
- name: Checkout Repository
uses: actions/checkout@v4
- name: Check spelling

- name: Run Typo and Spelling Check
uses: crate-ci/[email protected]
with:
config: .typos.toml # specify the custom config file
config: .typos.toml # Specify the custom configuration file
11 changes: 8 additions & 3 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: TagBot
name: Tag Bot

on:
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: "3"
default: '3'

permissions:
actions: read
checks: read
Expand All @@ -20,12 +22,15 @@ permissions:
repository-projects: read
security-events: read
statuses: read

jobs:
TagBot:
name: Automate Tag Process
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
- name: Run Julia TagBot
uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}

0 comments on commit b0e6532

Please sign in to comment.