Skip to content

3.0 schema and Comprehensive CI #280

3.0 schema and Comprehensive CI

3.0 schema and Comprehensive CI #280

Workflow file for this run

name: Check that ibek-support support modules will build in a container
on:
push:
pull_request:
jobs:
check-generate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Run schema/ioc instance generation tests
run: |
pip install -r requirements.txt
bash tests/test_generate.sh
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
strategy:
fail-fast: false
max-parallel: 10
matrix:
repo: [ioc-adaravis, ioc-pmac, ioc-lakeshore340, ioc-tetramm, ioc-opcua, ioc-motorSim, ioc-adsimdetector]
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
- os: ubuntu-latest
epics-target: linux-x86_64
extension: ""
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: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Setup
# before building the container set up to use this version of ibek-support
# and its associated version of ibek
env:
REPO: ${{ matrix.repo }}
run: |
git clone https://github.com/epics-containers/${REPO} /tmp/generic_ioc
cp -r . /tmp/generic_ioc/ibek-support
cp ./requirements.txt /tmp/generic_ioc
- name: Build image
uses: docker/build-push-action@v5
with:
context: /tmp/generic_ioc
platforms: ${{ matrix.platform }}
target: runtime
build-args: |
IMAGE_EXT=${{ matrix.extension }}
cache-from: type=gha,scope=${{ matrix.epics-target }}
cache-to: type=gha,mode=max,scope=${{ matrix.epics-target }}
tags: ci_test
load: true
- name: Test image
# can't test non native without some hardware to run on
if: ${{ matrix.epics-target == 'linux-x86_64' }}
run: /tmp/generic_ioc/tests/run-tests.sh ci_test