fix: replace patches with sed #829
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }}-${{ github.ref }} | |
env: | |
BUCKET_NAME: 'agoric-snapshots-public' | |
IMAGE_NAME: ${{ github.repository }} | |
REGISTRY: 'ghcr.io' | |
PROJECT_ID: 60745596728 | |
jobs: | |
test-package: | |
runs-on: 'ubuntu-latest' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install deps | |
run: | | |
# Enable corepack for packageManager config | |
corepack enable || sudo corepack enable | |
yarn install | |
- name: Lint repo | |
run: yarn lint | |
- name: Typecheck synthetic-chain | |
run: yarn tsc | |
working-directory: packages/synthetic-chain | |
- name: Test synthetic-chain | |
run: yarn test | |
working-directory: packages/synthetic-chain | |
test-proposals: | |
permissions: | |
contents: read | |
id-token: write | |
packages: write | |
runs-on: 'depot-ubuntu-22.04-16' | |
steps: | |
- name: free up disk space | |
run: | | |
df -h | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
echo "=== After cleanup:" | |
df -h | |
- name: Generate Timestamp | |
run: echo "TIMESTAMP=$(date '+%s')" >> $GITHUB_ENV | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Cloud SDK auth | |
uses: google-github-actions/auth@v2 | |
with: | |
project_id: ${{ env.PROJECT_ID }} | |
workload_identity_provider: projects/${{ env.PROJECT_ID }}/locations/global/workloadIdentityPools/github/providers/${{ github.event.repository.name }} | |
- name: Set up gcloud | |
uses: google-github-actions/setup-gcloud@v2 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
password: ${{ secrets.GITHUB_TOKEN }} | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
- name: Install deps | |
run: | | |
corepack enable || sudo corepack enable | |
yarn install | |
- name: Build | |
run: yarn build | |
- name: Tests | |
run: yarn test | |
- name: Upload state to storage | |
run: | | |
#! /bin/bash | |
set -o errexit -o errtrace -o xtrace | |
IMAGE_ID="$(echo "${{ env.REGISTRY }}/${{ github.repository }}" | awk '{print tolower($0)}')" | |
TAG="use-fast-usdc-beta" | |
TIMESTAMP="$(date '+%s')" | |
if test -z "$(docker image ls --filter "reference=$IMAGE_ID:$TAG" --format json)" | |
then | |
echo "Pulling image $IMAGE_ID:$TAG" | |
docker pull --quiet "$IMAGE_ID:$TAG" | |
fi | |
CONTAINER_ID="$(docker container run --detach --entrypoint /bin/sleep "$IMAGE_ID:$TAG" infinity)" | |
docker exec "$CONTAINER_ID" /bin/bash -c " | |
set -o errexit | |
source \"/usr/src/upgrade-test-scripts/source.sh\" | |
set -o nounset | |
ls --almost-all \$HOME/.agoric | \ | |
grep --extended-regexp --invert-match '^(config|data|keyring-test)$' | \ | |
xargs -I {} rm --force --recursive \$HOME/.agoric/{} | |
echo \"Zipping data of size \$(du --human-readable --null --summarize \$HOME/.agoric/data | awk '{printf \"%s\", \$1}')\" | |
tar --create --file \"/tmp/data-$TIMESTAMP\" --directory \$HOME/.agoric --gzip data | |
echo \"Zipping config of size \$(du --human-readable --null --summarize \$HOME/.agoric/config | awk '{printf \"%s\", \$1}')\" | |
tar --create --file \"/tmp/config-$TIMESTAMP\" --directory \$HOME/.agoric --gzip config | |
echo \"Zipping keyring-test of size \$(du --human-readable --null --summarize \$HOME/.agoric/keyring-test | awk '{printf \"%s\", \$1}')\" | |
tar --create --file \"/tmp/keyring-test-$TIMESTAMP\" --directory \$HOME/.agoric --gzip keyring-test | |
" | |
docker container cp --quiet "$CONTAINER_ID:/tmp/data-$TIMESTAMP" "/tmp/data-$TIMESTAMP" | |
docker container cp --quiet "$CONTAINER_ID:/tmp/config-$TIMESTAMP" "/tmp/config-$TIMESTAMP" | |
docker container cp --quiet "$CONTAINER_ID:/tmp/keyring-test-$TIMESTAMP" "/tmp/keyring-test-$TIMESTAMP" | |
docker container stop "$CONTAINER_ID" > /dev/null | |
docker container rm "$CONTAINER_ID" > /dev/null | |
gsutil cp "/tmp/state-$TIMESTAMP" gs://${{ env.BUCKET_NAME }}/a3p/\$CHAIN_ID/data-$TIMESTAMP.tar.gz | |
gsutil cp "/tmp/state-$TIMESTAMP" gs://${{ env.BUCKET_NAME }}/a3p/\$CHAIN_ID/config-$TIMESTAMP.tar.gz | |
gsutil cp "/tmp/state-$TIMESTAMP" gs://${{ env.BUCKET_NAME }}/a3p/\$CHAIN_ID/keyring-test-$TIMESTAMP.tar.gz | |
timeout-minutes: 60 | |
name: Proposal tests | |
on: | |
push: | |
branches: [usman/reset-emerynet] |