Skip to content

Commit

Permalink
Clean up Github Actions/buildkite
Browse files Browse the repository at this point in the history
This PR:

- ensures that Github action workflows are killed when a new commit is
pushed to the same branch/PR (following
https://stackoverflow.com/a/67939898)

- removes the need for the test environment from builkite jobs. The test
environment is used only for one job. When the depot is cold,
instantiating the test environment takes several minutes (when we have a
good depot it takes 1-2 minutes). Given that instantiating the
environment has to run before all the tests, this leads to unnecessary
latency.

- adds a new GitHub workflow 'lookahead'. The lookahead workflow is
non-required to merge PRs and runs tests and one simulation (the one
removed from the buildkite run) with julia 1.9 and julia 1.10 and the
latest dependencies.

- removes a stray file (codecov.yml)
  • Loading branch information
Sbozzolo committed Dec 18, 2023
1 parent d034af8 commit 5e33f45
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 32 deletions.
15 changes: 0 additions & 15 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ steps:
- "julia --project -e 'using Pkg; Pkg.precompile()'"
- "julia --project -e 'using Pkg; Pkg.status()'"

- echo "--- Instantiate test"
- "julia --project=test -e 'using Pkg; Pkg.develop(path = \".\")'"
- "julia --project=test -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
- "julia --project=test -e 'using Pkg; Pkg.precompile()'"
- "julia --project=test -e 'using Pkg; Pkg.status()'"

- echo "--- Instantiate examples"
- "julia --project=examples -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
- "julia --project=examples -e 'using Pkg; Pkg.precompile()'"
Expand Down Expand Up @@ -512,15 +506,6 @@ steps:
--config_file $CONFIG_PATH/test_io.yml
artifact_paths: "test_io/*"

- label: ":computer: Use test env with latest deps"
command: >
julia --color=yes --project=test examples/hybrid/driver.jl
--config_file $CONFIG_PATH/test_env.yml
artifact_paths: "test_env/*"
soft_fail: true
agents:
slurm_mem: 20GB

- label: ":computer: MPI io test"
command: >
srun julia --color=yes --project=examples examples/hybrid/driver.jl
Expand Down
3 changes: 3 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
comment: false
github_checks:
annotations: false
11 changes: 0 additions & 11 deletions .github/codecov.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/workflows/CodeCov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
codecov:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
pull_request:
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: ci ${{ matrix.version }} - ${{ matrix.os }}
Expand All @@ -14,6 +18,7 @@ jobs:
matrix:
version:
- '1.9'
- '~1.10.0-rc1'
os:
- ubuntu-latest
- macOS-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
pull_request:
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
docbuild:
runs-on: ubuntu-latest
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/julia_formatter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
pull_request:
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
format:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.0
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v2.2.0

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

# This action sets up a couple of tests for newer versions of julia and for
# dependencies more recent than the one in examples so that one can see if there
# are upcoming problems.

on:
push:
tags: '*'
pull_request:
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: ci ${{ matrix.version }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
version:
- '1.9'
- '~1.10.0-rc1'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- 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: Instantiate test env
run: |
julia --project=test -e "using Pkg; Pkg.instantiate(); Pkg.develop(path=\".\")"
- name: Run test_env.yml
continue-on-error: true
run: |
julia --project=test examples/hybrid/driver.jl --config_file config/model_configs/test_env.yml
- name: Run tests
run: |
julia --project=test test/runtests.jl
4 changes: 2 additions & 2 deletions config/model_configs/test_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ precip_model: "0M"
dt: "1secs"
t_end: "10secs"
dt_save_to_sol: "Inf"
z_elem: 25
h_elem: 12
z_elem: 20
h_elem: 8
dt_rad: "5secs"

0 comments on commit 5e33f45

Please sign in to comment.