From 9f2011b1e13f6d2e2494aba4012082bcef81ca83 Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Thu, 19 Oct 2023 07:25:34 +0100 Subject: [PATCH] fix CI --- .github/workflows/build.sh | 1 + .github/workflows/{buiild.yml => build.yml} | 42 +++++++++++++++------ ibek-support | 2 +- requirements.txt | 2 + 4 files changed, 34 insertions(+), 13 deletions(-) rename .github/workflows/{buiild.yml => build.yml} (60%) create mode 100644 requirements.txt diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 964fc4f..3db0354 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -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 diff --git a/.github/workflows/buiild.yml b/.github/workflows/build.yml similarity index 60% rename from .github/workflows/buiild.yml rename to .github/workflows/build.yml index edc4c81..4d85407 100644 --- a/.github/workflows/buiild.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 @@ -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 diff --git a/ibek-support b/ibek-support index 1d5bbc8..9272b54 160000 --- a/ibek-support +++ b/ibek-support @@ -1 +1 @@ -Subproject commit 1d5bbc8ae0506c7461475b0f5e8aaf322871c595 +Subproject commit 9272b54090ce883719654460891be0fcb1091113 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e5d1202 --- /dev/null +++ b/requirements.txt @@ -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