Skip to content

Merge branch 'dev' into release-1.18.3-patch #127

Merge branch 'dev' into release-1.18.3-patch

Merge branch 'dev' into release-1.18.3-patch #127

Workflow file for this run

name: Build gpubench only
on:
push:
paths:
- 'images/worker/gpubench/**'
permissions:
contents: read
packages: write
attestations: write
id-token: write
jobs:
pre-build:
runs-on: self-hosted
outputs:
UNSTABLE: ${{ steps.set-env.outputs.unstable }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit
- name: Set environment to global output variables based on branch
id: set-env
run: |
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
echo "unstable=false" >> $GITHUB_OUTPUT
else
echo "unstable=true" >> $GITHUB_OUTPUT
fi
- name: Print UNSTABLE from output
run: |
echo "Branch is - ${{ github.ref }}"
echo "UNSTABLE - ${{ steps.set-env.outputs.unstable }}"
gpubench_only:
runs-on: self-hosted
needs: pre-build
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install GO
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version-file: 'go.mod'
- name: Debug vars
run: |
echo "UNSTABLE - is ${{ needs.pre-build.outputs.unstable }}"
make get-version UNSTABLE=${{ needs.pre-build.outputs.unstable }}
- name: Check if version synced
run: make test-version-sync
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
- name: Log in to the Github Container registry
uses: docker/login-action@327cd5a69de6c009b9ce71bce8395f28e651bf99
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run gpu bench tests
run: |
UNSTABLE=${{ needs.pre-build.outputs.unstable }}
IMAGE_VERSION=$(make get-image-version UNSTABLE=${UNSTABLE})
VERSION=$(make get-version UNSTABLE=${UNSTABLE})
OPERATOR_IMAGE_TAG=$(make get-operator-tag-version UNSTABLE=${UNSTABLE})
echo "Running gpubench tests"
cd ./images/worker/gpubench/
go test
cd -
echo "Building tarball for jail"
make docker-build UNSTABLE="${UNSTABLE}" IMAGE_NAME=jail DOCKERFILE=jail/jail.dockerfile DOCKER_OUTPUT="--output type=tar,dest=jail_rootfs.tar"