-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch CI provider to GitHub Actions (#2095)
With the addition of support for a second base image in #2088, we no longer have enough CircleCI credits to test both images properly. GitHub Actions also provides more substantial runners and better caching, which may reduce the overall running time. This PR supersedes #2078.
- Loading branch information
1 parent
329f483
commit 8baeee3
Showing
8 changed files
with
272 additions
and
78 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,132 @@ | ||
name: Publish Images | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
latest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: docker/build-push-action@v5 | ||
name: Build standard production image | ||
with: | ||
context: . | ||
push: true | ||
tags: "kitware/cdash:latest" | ||
target: cdash | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
latest-ubi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: docker/build-push-action@v5 | ||
name: Build UBI production image | ||
with: | ||
context: . | ||
push: true | ||
tags: "kitware/cdash:latest-ubi" | ||
target: cdash | ||
build-args: | | ||
BASE_IMAGE=ubi | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
worker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: docker/build-push-action@v5 | ||
name: Build standard worker image | ||
with: | ||
context: . | ||
push: true | ||
tags: "kitware/cdash-worker:latest" | ||
target: cdash-worker | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
worker-ubi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: docker/build-push-action@v5 | ||
name: Build UBI worker image | ||
with: | ||
context: . | ||
push: true | ||
tags: "kitware/cdash-worker:latest-ubi" | ||
target: cdash-worker | ||
build-args: | | ||
BASE_IMAGE=ubi | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
testing: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: docker/build-push-action@v5 | ||
name: Build standard development image | ||
with: | ||
context: . | ||
push: true | ||
tags: "kitware/cdash:testing" | ||
target: cdash | ||
build-args: | | ||
DEVELOPMENT_BUILD=1 | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
testing-ubi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: docker/build-push-action@v5 | ||
name: Build UBI development image | ||
with: | ||
context: . | ||
push: true | ||
tags: "kitware/cdash:testing-ubi" | ||
target: cdash | ||
build-args: | | ||
BASE_IMAGE=ubi | ||
DEVELOPMENT_BUILD=1 | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
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,68 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
tests: | ||
env: | ||
SITENAME: GitHub Actions | ||
BASE_IMAGE: ${{matrix.base-image}} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
database: ['mysql', 'postgres'] | ||
base-image: ['debian', 'ubi'] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-buildx-action@v3 | ||
- name: Build images | ||
run: | | ||
docker compose \ | ||
-f docker/docker-compose.yml \ | ||
-f docker/docker-compose.dev.yml \ | ||
-f "docker/docker-compose.${{matrix.database}}.yml" \ | ||
--env-file .env.dev up -d \ | ||
--build \ | ||
--wait | ||
- name: Run Tests | ||
run: | | ||
source .github/workflows/commands.bash | ||
cdash_run_and_submit_${{matrix.database}}_ctest | ||
build-images: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
base-image: [ 'debian', 'ubi' ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/build-push-action@v5 | ||
name: Build ${{matrix.base-image}} production image | ||
with: | ||
context: . | ||
push: false | ||
target: cdash | ||
build-args: | | ||
BASE_IMAGE=${{matrix.base-image}} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
# Building the worker image should be almost instantaneous due to caching of the regular image | ||
- uses: docker/build-push-action@v5 | ||
name: Build ${{matrix.base-image}} worker image | ||
with: | ||
context: . | ||
push: false | ||
target: cdash-worker | ||
build-args: | | ||
BASE_IMAGE=${{matrix.base-image}} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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
File renamed without changes.
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,63 @@ | ||
name: Publish Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
debian: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: docker/build-push-action@v5 | ||
name: Build ${{ github.ref_name }} image | ||
with: | ||
context: . | ||
push: true | ||
tags: "kitware/cdash:${{ github.ref_name }}" | ||
target: cdash | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
- uses: docker/build-push-action@v5 | ||
name: Build ${{ github.ref_name }} worker image | ||
with: | ||
context: . | ||
push: true | ||
tags: "kitware/cdash-worker:${{ github.ref_name }}" | ||
target: cdash | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
ubi: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker/setup-buildx-action@v3 | ||
- uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- uses: docker/build-push-action@v5 | ||
name: Build ${{ github.ref_name }} image | ||
with: | ||
context: . | ||
push: true | ||
tags: "kitware/cdash:${{ github.ref_name }}-ubi" | ||
target: cdash | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
- uses: docker/build-push-action@v5 | ||
name: Build ${{ github.ref_name }} worker image | ||
with: | ||
context: . | ||
push: true | ||
tags: "kitware/cdash-worker:${{ github.ref_name }}-ubi" | ||
target: cdash | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
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
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