Skip to content

Commit

Permalink
refactor(workflow): rename sandbox job to package-sandbox
Browse files Browse the repository at this point in the history
- Removed the `sandbox` job from the workflow.
- Added a new job `package-sandbox` with the same steps as the removed `sandbox` job.
- Updated the `test` job to depend on the new `package-sandbox` job instead of the removed `sandbox` job.
  • Loading branch information
erikreinert committed Sep 9, 2024
1 parent d0a6fe9 commit f681575
Showing 1 changed file with 32 additions and 31 deletions.
63 changes: 32 additions & 31 deletions .github/workflows/vorpal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,6 @@ jobs:
key: dev-env-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('script/dev.sh', 'script/dev/**') }}
path: .env

sandbox:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner:
- macos-latest
- ubuntu-latest
- ubuntu-latest-arm64
steps:
- uses: actions/checkout@v4

- run: ./script/debian.sh "sandbox"

- run: ./script/sandbox.sh

- run: |
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
SANDBOX_HASH=$(cat "${PWD}/script/sandbox/sha256sum/${OS}/sandbox")
echo "ARCH=$(uname -m | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "OS=${OS}" >> $GITHUB_ENV
echo "SANDBOX_HASH=${SANDBOX_HASH}" >> $GITHUB_ENV
- run: |
cp "/var/lib/vorpal/store/vorpal-sandbox-${SANDBOX_HASH}.package.tar.zst" \
"${PWD}/vorpal-sandbox-${SANDBOX_HASH}.package.tar.zst"
- uses: actions/upload-artifact@v4
with:
name: vorpal-sandbox-${{ env.ARCH }}-${{ env.OS }}
path: vorpal-sandbox-${{ env.SANDBOX_HASH }}.package.tar.zst

code-quality:
needs:
- dev
Expand Down Expand Up @@ -133,9 +102,41 @@ jobs:
key: package-target-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
path: target

package-sandbox:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner:
- macos-latest
- ubuntu-latest
- ubuntu-latest-arm64
steps:
- uses: actions/checkout@v4

- run: ./script/debian.sh "sandbox"

- run: ./script/sandbox.sh

- run: |
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
SANDBOX_HASH=$(cat "${PWD}/script/sandbox/sha256sum/${OS}/sandbox")
echo "ARCH=$(uname -m | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
echo "OS=${OS}" >> $GITHUB_ENV
echo "SANDBOX_HASH=${SANDBOX_HASH}" >> $GITHUB_ENV
- run: |
cp "/var/lib/vorpal/store/vorpal-sandbox-${SANDBOX_HASH}.package.tar.zst" \
"${PWD}/vorpal-sandbox-${SANDBOX_HASH}.package.tar.zst"
- uses: actions/upload-artifact@v4
with:
name: vorpal-sandbox-${{ env.ARCH }}-${{ env.OS }}
path: vorpal-sandbox-${{ env.SANDBOX_HASH }}.package.tar.zst

test:
needs:
- package
- package-sandbox
runs-on: ${{ matrix.runner }}
strategy:
matrix:
Expand Down

0 comments on commit f681575

Please sign in to comment.