run macos ci on arm runner #111
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: Publish docker image | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
release: | |
types: [published] | |
push: | |
branches: | |
- master # Push events on master branch | |
jobs: | |
deploy-judi-image: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
version: ['1.6', '1.7', '1.8', '1.9', '1.10'] | |
steps: | |
- name: Check event name | |
run: echo ${{ github.event_name }} | |
- name: Checkout JUDI | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1.0.2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1.1.2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: JUDI development image | |
uses: docker/build-push-action@v2.4.0 | |
with: | |
context: . | |
file: ./docker/Dockerfile.JUDI | |
push: true | |
network: host | |
build-args: JVER=${{ matrix.version }} | |
tags: mloubout/judi:${{ matrix.version }}-dev | |
- name: JUDI release image | |
if: github.event_name == 'release' | |
uses: docker/build-push-action@v2.4.0 | |
with: | |
context: . | |
file: ./docker/Dockerfile.JUDI | |
push: true | |
network: host | |
build-args: JVER=${{ matrix.version }} | |
tags: | | |
mloubout/judi:${{ matrix.version }}-latest | |
mloubout/judi:${{ matrix.version }}-${{ github.event.release.tag_name }} | |
test-judi-image: | |
needs: deploy-judi-image | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
version: ['1.6', '1.7', '1.8', '1.9', '1.10'] | |
steps: | |
- name: Run simple test | |
run: | | |
docker pull 'mloubout/judi:${{ matrix.version }}-dev' | |
docker run --rm --name testrun 'mloubout/judi:${{ matrix.version }}-dev' julia -e 'using Pkg;ENV["GROUP"]="BASICS";Pkg.test("JUDI")' | |
# NOTE: Suitable for the time being but will need to modify when we switch runners | |
- name: Clean | |
run: | | |
docker system prune -a -f |