Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize CI workflows #116

Merged
merged 10 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 16 additions & 52 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: CI
# Run on master, tags, or any pull request
on:
schedule:
- cron: '0 2 * * *' # Daily at 2 AM UTC (8 PM CST)
push:
branches: [master]
tags: ["*"]
branches: "master"
tags: "*"
pull_request:
paths:
- "src/**/*.jl"
- "test/**/*.jl"
- "Project.toml"
- ".github/workflows/CI.yml"
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
Expand All @@ -15,62 +18,23 @@ jobs:
fail-fast: false
matrix:
version:
- "1.0" # LTS
- "1.0" # Oldest supported version
- "1.6" # LTS
- "1" # Latest Release
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
- x86
exclude:
# Test 32-bit only on Linux
- os: macOS-latest
arch: x86
- os: windows-latest
arch: x86
include:
# Add a 1.5 job because that's what Invenia actually uses
- os: ubuntu-latest
version: 1.5
arch: x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v2
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-
${{ runner.os }}-${{ matrix.arch }}-test-
${{ runner.os }}-${{ matrix.arch }}-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
- 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@v1
with:
file: lcov.info

slack:
name: Notify Slack Failure
needs: test
runs-on: ubuntu-latest
if: always() && github.event_name == 'schedule'
steps:
- uses: technote-space/workflow-conclusion-action@v2
- uses: voxmedia/github-action-slack-notify-build@v1
if: env.WORKFLOW_CONCLUSION == 'failure'
- uses: codecov/codecov-action@v4
with:
channel: nightly-dev
status: FAILED
color: danger
env:
SLACK_BOT_TOKEN: ${{ secrets.DEV_SLACK_BOT_TOKEN }}
files: lcov.info
29 changes: 23 additions & 6 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
# Based upon: https://github.com/JuliaRegistries/CompatHelper.jl/blob/70ddefcdea232a7cde9d6976794ece7d0cca7048/.github/workflows/CompatHelper.yml
name: CompatHelper
on:
pull_request:
paths:
- ".github/workflows/CompatHelper.yml"
schedule:
- cron: '0 0 * * *' # Everyday at midnight
workflow_dispatch:
- cron: "0 0 * * *" # Everyday at midnight
workflow_dispatch: {}
permissions:
contents: write
pull-requests: write
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
- uses: julia-actions/setup-julia@v2
with:
version: "1"
- uses: julia-actions/cache@v2
- name: Install CompatHelper
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.add(PackageSpec(name="CompatHelper", version="3"))
- name: Run CompatHelper
shell: julia --color=yes {0}
run: |
using CompatHelper
CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
26 changes: 11 additions & 15 deletions .github/workflows/JuliaNightly.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
name: JuliaNightly
# Nightly Scheduled Julia Nightly Run
on:
pull_request:
paths:
- ".github/workflows/JuliaNightly.yml"
schedule:
- cron: '0 2 * * *' # Daily at 2 AM UTC (8 PM CST)
- cron: "0 2 * * *" # Daily at 2 AM UTC (8 PM CST)
jobs:
test:
name: Julia Nightly - Ubuntu - x64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: nightly
arch: x64
- uses: actions/cache@v2
env:
cache-name: julia-nightly-cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ env.cache-name }}-
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
- 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@v1
- uses: codecov/codecov-action@v4
with:
file: lcov.info
files: lcov.info
23 changes: 17 additions & 6 deletions .github/workflows/blue_style_formatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,29 @@ name: Format suggestions

on:
pull_request:
paths:
- "**.jl"
- ".github/workflows/blue_style_formatter.yml"

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: 1
- run: |
julia -e 'using Pkg; Pkg.add("JuliaFormatter")'
julia -e 'using JuliaFormatter; format(".", BlueStyle(); verbose=true)'
version: "1"
- uses: julia-actions/cache@v2
- name: Install JuliaFormatter
shell: julia --color=yes {0}
run: |
using Pkg
Pkg.add(PackageSpec(name="JuliaFormatter", version="1"))
- name: Check Formatting
shell: julia --color=yes {0}
run: |
using JuliaFormatter
format(".", BlueStyle(); verbose=true)
- uses: reviewdog/action-suggester@v1
with:
tool_name: JuliaFormatter
Expand Down
Loading