Merge pull request #9 from epics-containers/gilesknap-patch-1 #93
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: Check that ibek-support support modules will build in a container | |
on: | |
push: | |
pull_request: | |
jobs: | |
check-docker-build: | |
# pull requests are a duplicate of a branch push if within the same repo. | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository | |
permissions: | |
contents: read | |
packages: write | |
env: | |
CACHE: /tmp/.buildx-cache | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# rtems is cross compiled on ubuntu-latest | |
# linux is natively compiled on ubuntu-latest and macos-latest | |
# enable below for RTEMS | |
# - architecture: rtems | |
# os: ubuntu-latest | |
# platform: linux/amd64 | |
- architecture: linux | |
os: ubuntu-latest | |
platform: linux/amd64 | |
# enable below for MACOS native build on M1 macs | |
# M1 Macs are coming!: https://github.com/github/roadmap/issues/528 | |
# - architecture: linux | |
# os: macos-latest-x1 | |
# platform: linux/arm64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup docker (missing on MacOS) | |
if: runner.os == 'macos' | |
uses: docker-practice/actions-setup-docker@fd7ecdac7caf8e2c541a48c9bcc280aae59a8461 | |
- name: Log in to GitHub Docker Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io/${{ github.repository_owner }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker Test Build Script | |
env: | |
ARCH: ${{ matrix.architecture }} | |
PLATFORM: ${{ matrix.platform }} | |
CACHE: ${{ env.CACHE }} | |
run: | | |
for test in tests/*.sh; do | |
echo "RUNNING TEST SCRIPT ${test}" | |
${test} | |
done |