Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxd3 committed Nov 29, 2024
1 parent 1d47fe2 commit 18dd5b5
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 5 deletions.
33 changes: 30 additions & 3 deletions .github/workflows/Benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,45 @@ jobs:
with:
version: '1'

- name: Run benchmarks
- name: Run benchmarks on Ubuntu
run: |
julia --project=benchmark -e 'using Pkg; Pkg.instantiate()'
julia --project=benchmark benchmark/run_benchmarks.jl > benchmark_results.txt
- name: Upload benchmark results
run-benchmark-macos:
runs-on: macOS-latest

strategy:
matrix:
include:
- version: '1'
os: macOS-latest
arch: aarch64

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Julia
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}

- name: Run benchmarks on macOS
run: |
julia --project=benchmark -e 'using Pkg; Pkg.instantiate()'
julia --project=benchmark benchmark/run_benchmarks.jl >> benchmark_results.txt
- name: Upload combined benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark-results
path: benchmark_results.txt

- name: Post results to PR
- name: Post combined results to PR
uses: marocchino/sticky-pull-request-comment@v2
with:
path: benchmark_results.txt
4 changes: 2 additions & 2 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:
fail-fast: false
matrix:
version: ['1', '1.9', 'nightly']
os: [ubuntu-latest, macOS-latest, windows-latest]
os: [ubuntu-latest, windows-latest]
arch: [x64]
include:
- version: '1'
os: ubuntu-latest
arch: x64
coverage: true

steps:
- uses: actions/checkout@v4

Expand Down
82 changes: 82 additions & 0 deletions .github/workflows/TestsMacOS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: TestsMacOS

on:
push:
branches: ["master"]
pull_request:

workflow_dispatch:

jobs:
test:
name: Julia ${{ matrix.version }} on ${{ matrix.os }} (${{ matrix.arch }})
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.version == 'nightly' }}
strategy:
fail-fast: false
matrix:
version: ['1', '1.9', 'nightly']
os: [macOS-latest]
arch: [aarch64]

steps:
- uses: actions/checkout@v4

- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}

- uses: actions/cache@v4
with:
path: |
~/.julia
~/.julia/artifacts
key: ${{ runner.os }}-julia-${{ matrix.version }}-${{ matrix.arch }}-${{ hashFiles('**/Project.toml', '**/Manifest.toml') }}
restore-keys: |
${{ runner.os }}-julia-${{ matrix.version }}-${{ matrix.arch }}-
${{ runner.os }}-julia-${{ matrix.version }}-
- uses: julia-actions/julia-buildpkg@v1

- name: Running elementary tests
uses: julia-actions/julia-runtest@v1
env:
TEST_GROUP: "elementary"

- name: Running compilation tests
uses: julia-actions/julia-runtest@v1
env:
TEST_GROUP: "compilation"

- name: Running `gibbs` tests
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.test(coverage=true);"
env:
TEST_GROUP: "gibbs"

- name: Running `mcmchains` tests
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.test(coverage=true);"
env:
TEST_GROUP: "mcmchains"

- uses: julia-actions/julia-processcoverage@v1
if: matrix.coverage

- uses: codecov/codecov-action@v4
if: matrix.coverage
with:
file: lcov.info

- uses: coverallsapp/github-action@master
if: matrix.coverage
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.info

0 comments on commit 18dd5b5

Please sign in to comment.