CI #238
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
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
schedule: | |
- cron: '0 5 * * FRI' | |
concurrency: | |
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{github.event_name == 'pull_request'}} | |
jobs: | |
CI: | |
continue-on-error: ${{ matrix.config.continue-on-error == 'true' }} | |
strategy: | |
matrix: | |
config: | |
- {dockerfile: 'fedora', tag: 'latest'} | |
- {dockerfile: 'fedora', tag: 'rawhide', build_args: 'TAG=rawhide', continue-on-error: 'true'} | |
- {dockerfile: 'ubuntu', tag: 'latest'} | |
- {dockerfile: 'ubuntu', tag: 'rolling', build_args: 'TAG=rolling'} | |
- {dockerfile: 'ubuntu', tag: 'devel', build_args: 'TAG=devel', continue-on-error: 'true'} | |
- {dockerfile: 'opensuse', tag: 'latest'} | |
- {dockerfile: 'ubuntu', tag: 'intel', build_args: 'TAG=intel,INTEL=yes'} | |
- {dockerfile: 'fedora', tag: 'nompi', build_args: 'MPI=no'} | |
- {dockerfile: 'rocm', tag: 'latest', continue-on-error: 'true'} | |
- {dockerfile: 'cuda', tag: '12.2.0', continue-on-error: 'true'} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout out code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Github Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Convert build_args | |
id: build_args | |
run: | | |
echo "args<<EOF" >> $GITHUB_OUTPUT | |
echo ${{ matrix.config.build_args }} | sed 's/,/\n/g' >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- name: Build and Push Docker images for Github Container Registry | |
uses: docker/build-push-action@v4 | |
with: | |
tags: ghcr.io/ecp-copa/ci-containers/${{ matrix.config.dockerfile }}:${{ matrix.config.tag }} | |
file: ${{ matrix.config.dockerfile }} | |
build-args: ${{ steps.build_args.outputs.args }} | |
pull: true | |
push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} |