Skip to content

Commit

Permalink
dont do parallel developer/runtime builds
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Mar 19, 2024
1 parent 05de324 commit f8f22a8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
fail-fast: false
matrix:
epics-target: [RTEMS-beatnik, linux-x86_64] # , linux-aarch64]
target: [developer, runtime]
include:
- os: ubuntu-latest # everyone is on os-latest

Expand All @@ -39,7 +38,7 @@ jobs:

runs-on: ${{ matrix.os }}
env:
TAG: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}${{ matrix.extension }}-${{ matrix.target }}:${{ github.ref_name }}
TAG: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}${{ matrix.extension }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -64,35 +63,50 @@ jobs:
with:
context: .
platforms: ${{ matrix.platform }}
target: ${{ matrix.target }}
target: runtime
build-args: |
EPICS_TARGET_ARCH=${{ matrix.epics-target }}
EPICS_HOST_ARCH=${{ matrix.epics-host }}
IMAGE_EXT=${{ matrix.extension }}
${{ matrix.runtime }}
tags: ${{ env.TAG }}
cache-from: type=gha,scope=${{ matrix.epics-target }}-${{ matrix.target }}
cache-to: type=gha,mode=max,scope=${{ matrix.epics-target }}-${{ matrix.target }}
tags: ci_test
load: true

- name: Test image
# can't test non native without some hardware to run on
if: ${{ matrix.runtime == '' }}
run: tests/run-tests.sh
run: tests/run-tests.sh ci_test

- name: Push image
- name: Push developer image
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ matrix.platform }}
target: ${{ matrix.target }}
target: developer
build-args: |
EPICS_TARGET_ARCH=${{ matrix.epics-target }}
EPICS_HOST_ARCH=${{ matrix.epics-host }}
IMAGE_EXT=${{ matrix.extension }}
${{ matrix.runtime }}
tags: ${{ env.TAG }}
tags: ${{ env.TAG }}-developer:${{ github.ref_name }}
push: true

- name: Push runtime image
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ matrix.platform }}
target: runtime
build-args: |
EPICS_TARGET_ARCH=${{ matrix.epics-target }}
EPICS_HOST_ARCH=${{ matrix.epics-host }}
IMAGE_EXT=${{ matrix.extension }}
${{ matrix.runtime }}
tags: ${{ env.TAG }}-runtime:${{ github.ref_name }}
push: true

release:
Expand Down
1 change: 1 addition & 0 deletions tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# all present and correct and that mounting IOC config or ibek config
# works as expected.

TAG=${1}
THIS=$(realpath $(dirname $0))
ROOT=$(realpath ${THIS}/..)
CONF=/epics/ioc/config
Expand Down

0 comments on commit f8f22a8

Please sign in to comment.