-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #786 from baagaard-usgs/ci-github-actions
Create CI pipeline using GitHub Actions
- Loading branch information
Showing
4 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: run-ci | ||
|
||
concurrency: | ||
group: ${{ github.actor }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
stage-1: | ||
uses: ./.github/workflows/ci-stage-1.yml | ||
stage-2: | ||
uses: ./.github/workflows/ci-stage-2.yml | ||
needs: [stage-1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: stage-1 | ||
|
||
on: | ||
- workflow_call | ||
|
||
env: | ||
IMAGE_REGISTRY: "ghcr.io/geodynamics/pylith_installer" | ||
|
||
jobs: | ||
|
||
# CI tests | ||
tests: | ||
strategy: | ||
matrix: | ||
os: | ||
- debian-stable | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Build Docker image | ||
run: docker build -t pylith-testenv --build-arg BASE_IMAGE=$IMAGE_REGISTRY/testenv-${{ matrix.os }} --target build -f docker/pylith-testenv . | ||
|
||
- name: Run tests | ||
run: docker run pylith-testenv ci-config/run_tests.sh | ||
|
||
# Build documentation | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Build Docker image | ||
run: docker build -t pylith-docenv --build-arg BASE_IMAGE=$IMAGE_REGISTRY/testenv-ubuntu-22.04 -f docker/pylith-docenv . | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: stage-2 | ||
|
||
on: | ||
- workflow_call | ||
|
||
env: | ||
IMAGE_REGISTRY: "ghcr.io/geodynamics/pylith_installer" | ||
|
||
jobs: | ||
|
||
# CI tests | ||
tests: | ||
strategy: | ||
matrix: | ||
os: | ||
- debian-testing | ||
- ubuntu-20.04 | ||
- ubuntu-22.04 | ||
- fedora-39 | ||
- rockylinux-8 | ||
- rockylinux-9 | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Build Docker image | ||
run: docker build -t pylith-testenv --build-arg BASE_IMAGE=$IMAGE_REGISTRY/testenv-${{ matrix.os }} --target build -f docker/pylith-testenv . | ||
|
||
- name: Run tests | ||
run: docker run pylith-testenv ci-config/run_tests.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters