Skip to content

Commit

Permalink
Reduce number of CI workflow files by supporting input tags for docke…
Browse files Browse the repository at this point in the history
…r image
  • Loading branch information
jorgensd committed May 13, 2024
1 parent 5493cde commit 53e9cb7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 47 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ concurrency:
jobs:
build-docs:
uses: ./.github/workflows/docs.yml
with:
tag: "stable"

run-tests:
uses: ./.github/workflows/test_stable.yml
uses: ./.github/workflows/tests.yml
with:
tag: "stable"

deploy:
runs-on: ubuntu-22.04
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,30 @@ on:
- main

workflow_dispatch:
inputs:
tag:
description: 'Tag of DOLFINx docker image'
default: 'nightly'
required: true
type: string
workflow_call:
inputs:
tag:
description: 'Tag of DOLFINx docker image'
default: 'nightly'
required: true
type: string

env:
DEB_PYTHON_INSTALL_LAYOUT: deb_system

jobs:
build:
runs-on: ubuntu-22.04
container: ghcr.io/fenics/dolfinx/dolfinx:stable
env:
DEFAULT_TAG: nightly
DEB_PYTHON_INSTALL_LAYOUT: deb_system
container: ghcr.io/fenics/dolfinx/dolfinx:${{ inputs.tag || github.env.DEFAULT_TAG }}

steps:
- name: Checkout
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/test_stable.yml

This file was deleted.

24 changes: 19 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
name: Test package against nightly image

name: Test OASISx against DOLFINx (docker)
on:
push:
branches:
- main
workflow_call:
inputs:
tag:
description: 'Tag of DOLFINx docker image'
default: 'nightly'
required: true
type: string
workflow_dispatch:
inputs:
tag:
description: 'Tag of DOLFINx docker image'
default: 'nightly'
required: true
type: string

pull_request:
branches:
- main
schedule:
- cron: "0 8 * * *"

env:
DEB_PYTHON_INSTALL_LAYOUT: deb_system

jobs:
tests:
runs-on: ubuntu-22.04
container: ghcr.io/fenics/dolfinx/dolfinx:nightly
env:
DEFAULT_TAG: nightly
DEB_PYTHON_INSTALL_LAYOUT: deb_system

container: ghcr.io/fenics/dolfinx/dolfinx:${{ inputs.tag || github.env.DEFAULT_TAG }}

steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit 53e9cb7

Please sign in to comment.