From 57eab448acb0ece2ad708dace1c092c668cf948b Mon Sep 17 00:00:00 2001 From: soup-bowl Date: Fri, 3 Apr 2026 17:47:03 +0100 Subject: [PATCH] Added CST to the pipelines. --- .github/workflows/build-main.yml | 38 +++++++++++++++++++++++++++++- .github/workflows/build-source.yml | 35 ++++++++++++++++++++++++++- 2 files changed, 71 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index 8b614de..15744c7 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -71,6 +71,7 @@ jobs: file: Dockerfile platforms: linux/amd64,linux/arm64 target: final-screen + skip-test: true - version: "0.9.3.0" tag: > ghcr.io/${{ github.repository }}:alpine-beta @@ -103,7 +104,42 @@ jobs: id: buildx uses: docker/setup-buildx-action@v4 - - name: Build Container + - name: Build for test (amd64) + if: ${{ !matrix.skip-test }} + uses: docker/build-push-action@v7 + with: + push: false + load: true + context: "{{defaultContext}}:${{ matrix.folder }}" + file: "${{ matrix.file }}" + tags: opensimulator-ci:${{ github.run_id }} + platforms: linux/amd64 + target: "${{ matrix.target }}" + build-args: | + OPENSIM_VERSION=${{ matrix.version }} + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Cache CST + if: ${{ !matrix.skip-test }} + id: cache-cst + uses: actions/cache@v4 + with: + path: ./container-structure-test + key: container-structure-test-linux-amd64 + + - name: Download CST + if: ${{ !matrix.skip-test && steps.cache-cst.outputs.cache-hit != 'true' }} + run: | + curl -fsSL -o container-structure-test https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64 + chmod +x container-structure-test + + - name: Run CST + if: ${{ !matrix.skip-test }} + run: | + ./container-structure-test test --image opensimulator-ci:${{ github.run_id }} --config unit-test.yaml + + - name: Build and Push Container uses: docker/build-push-action@v7 with: push: true diff --git a/.github/workflows/build-source.yml b/.github/workflows/build-source.yml index 3e509b5..1903952 100644 --- a/.github/workflows/build-source.yml +++ b/.github/workflows/build-source.yml @@ -55,7 +55,40 @@ jobs: id: buildx uses: docker/setup-buildx-action@v4 - - name: Build Container + - name: Build for test + if: ${{ !matrix.skip-test }} + uses: docker/build-push-action@v7 + with: + push: false + load: true + context: "{{defaultContext}}:${{ matrix.folder }}" + file: "${{ matrix.file }}" + tags: opensimulator-ci:${{ github.run_id }} + build-args: | + OPENSIM_VERSION=${{ matrix.version }} + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Cache CST + if: ${{ !matrix.skip-test }} + id: cache-cst + uses: actions/cache@v4 + with: + path: ./container-structure-test + key: container-structure-test-linux-amd64 + + - name: Download CST + if: ${{ !matrix.skip-test && steps.cache-cst.outputs.cache-hit != 'true' }} + run: | + curl -fsSL -o container-structure-test https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64 + chmod +x container-structure-test + + - name: Run CST + if: ${{ !matrix.skip-test }} + run: | + ./container-structure-test test --image opensimulator-ci:${{ github.run_id }} --config unit-test.yaml + + - name: Push Container #if: github.event_name != 'schedule' || matrix.tag == 'source' uses: docker/build-push-action@v7 with: