Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Oct 19, 2023
1 parent e5f9283 commit 9f2011b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ ec dev launch-local ${EC_TAG} --execute \

# run acceptance tests
shopt -s nullglob # expand to nothing if no tests are found
ls -l ${THIS}/../../tests
for t in "${THIS}/../../tests/*.sh"; do ${t}; done

42 changes: 30 additions & 12 deletions .github/workflows/buiild.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ jobs:
build-push-images:
# 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
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
Expand All @@ -17,9 +16,12 @@ jobs:
strategy:
fail-fast: false
matrix:
# TODO add rtems
architecture: ["linux"]
include:
- architecture: linux
os: ubuntu-latest
platform: linux/amd64

runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -41,25 +43,41 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Docker Build Script
env:
REGISTRY: ghcr.io
ARCH: ${{ matrix.architecture }}
REPOSITORY: ${{ github.repository }}
PLATFORM: ${{ matrix.platform }}
TAG: ${{ github.ref_name }}
PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
CACHE: ${{ env.CACHE }}
run: .github/workflows/build.sh

tests:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
- name: Upload schema as artifact
uses: actions/upload-artifact@v3
with:
name: ioc-schema
path: ibek.ioc.schema.json

release:
# Release on tag push - publish ioc schema
needs: [build-push-images]
if: ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
submodules: recursive
name: ioc-schema
path: ./

- name: System Test
run: tests/run-tests.sh
- name: Github Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with:
files: |
ibek.ioc.schema.json
generate_release_notes: true
2 changes: 1 addition & 1 deletion ibek-support
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# TODO using dev for the moment. Should be a pin to the current release
git+https://github.com/epics-containers/epics-containers-cli.git@dev

0 comments on commit 9f2011b

Please sign in to comment.