Skip to content

Commit

Permalink
feat(ci): remove simnode
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen committed Jan 16, 2023
1 parent 83d70e4 commit b5b75fc
Showing 1 changed file with 18 additions and 73 deletions.
91 changes: 18 additions & 73 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ jobs:
command: nix -- build .#spell-check
token: "${{ secrets.CACHIX_AUTH_TOKEN }}"

# This isn't templated, since checkout needs to happen before templating occurs.
# This isn't templated, since checkout needs to happen before templating occurs.
docs-check:
name: "Docs check"
runs-on:
Expand Down Expand Up @@ -318,19 +318,19 @@ jobs:
# Marker status code in case of network failure.
STATUS_TRANSIENT_FAILURE=200
# Maximum retries in case of network failures.
RETRIES=5
CMD="cachix watch-exec --jobs 16 --compression-level $CACHIX_COMPRESSION_LEVEL composable-community nix -- build .#docs-static --no-update-lock-file --show-trace -L 2> >(tee -a $LOG_FILE >&2)"
RETRIES=5
CMD="cachix watch-exec --jobs 16 --compression-level $CACHIX_COMPRESSION_LEVEL composable-community nix -- build .#docs-static --no-update-lock-file --show-trace -L 2> >(tee -a $LOG_FILE >&2)"
# Marker that a network error occurred.
BAD="HTTP error 200 ('')"
BAD="HTTP error 200 ('')"
LOG_FILE=/tmp/out.log
function run() {
eval "${CMD?}"
STATUS_CODE=$?
if [[ $STATUS_CODE -ne 0 ]] ; then
C=$(grep -c "HTTP error 200" $LOG_FILE)
if [[ $C -gt 0 ]]; then
STATUS_CODE=$STATUS_TRANSIENT_FAILURE
if [[ $C -gt 0 ]]; then
STATUS_CODE=$STATUS_TRANSIENT_FAILURE
fi
fi
}
Expand All @@ -347,7 +347,7 @@ jobs:
((try=try+1))
done
exit $((STATUS_CODE))
exit $((STATUS_CODE))
shell: "bash"
working-directory: ./docs
- uses: FirebaseExtended/action-hosting-deploy@0f248036885ae672f78587669fa2923f0ef6cac2
Expand Down Expand Up @@ -539,7 +539,7 @@ jobs:
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: |
PREVIEW_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
PREVIEW_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
echo "preview-url=${PREVIEW_URL}" >> $GITHUB_OUTPUT
id: deploy
- name: Comment PR
Expand Down Expand Up @@ -652,40 +652,6 @@ jobs:
command: nix -- run .#benchmarks-once-${{ matrix.runtime }}
token: "${{ secrets.CACHIX_AUTH_TOKEN }}"

check-simnode:
name: "Simnode"
needs: package-simnode-tests
runs-on:
- self-hosted
- linux
- x64
- sre
concurrency:
group: check-simnode-${{ matrix.runtime }}-${{ github.ref }}
cancel-in-progress: true
strategy:
matrix:
runtime: [picasso, composable]
container:
image: niteo/nixpkgs-nixos-22.05:316b762afdb9e142a803f29c49a88b4a47db80ee
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.DEPLOY_DALI }}
export_default_credentials: true
- uses: "./.github/templates/watch-exec"
with:
pre-run: |
FILENAME=$(date -d yesterday +'%m-%d-%Y').zip
GS_BUCKET="${{ matrix.runtime }}-data-store"
gsutil cp gs://$GS_BUCKET/"$FILENAME" .
unzip -o "$FILENAME" -d /tmp/db
command: nix -- run .#simnode-tests-${{ matrix.runtime }}
token: "${{ secrets.CACHIX_AUTH_TOKEN }}"
nix-env: nixpkgs.python3 nixpkgs.unzip

local-integration-tests:
name: "Local integration tests"
runs-on:
Expand All @@ -708,25 +674,6 @@ jobs:
command: nix -- build .#check-${{ matrix.runtime }}-integration-tests
token: "${{ secrets.CACHIX_AUTH_TOKEN }}"

package-simnode-tests:
name: "Package Simnode Tests"
runs-on:
- self-hosted
- linux
- x64
- sre
concurrency:
group: package-simnode-tests-${{ matrix.runtime }}-${{ github.ref }}
cancel-in-progress: true
container:
image: niteo/nixpkgs-nixos-22.05:316b762afdb9e142a803f29c49a88b4a47db80ee
steps:
- uses: actions/checkout@v3
- uses: "./.github/templates/watch-exec"
with:
command: nix -- build .#simnode-tests
token: "${{ secrets.CACHIX_AUTH_TOKEN }}"

package-composable-node:
name: "Package Composable node"
needs: common-deps
Expand Down Expand Up @@ -794,7 +741,7 @@ jobs:
- sre
strategy:
matrix:
node: [statemine, bifrost]
node: [statemine, bifrost]
concurrency:
group: ${{ github.workflow }}-package-${{ matrix.node }}-node-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -806,7 +753,7 @@ jobs:
with:
command: nix -- build .#${{ matrix.node }}-node
token: "${{ secrets.CACHIX_AUTH_TOKEN }}"

package-acala-node:
name: "Package Acala node"
runs-on:
Expand Down Expand Up @@ -849,7 +796,7 @@ jobs:
name: "Cache devnet all dev local"
strategy:
matrix:
runtime: [devnet-dali-complete, devnet-picasso-complete, devnet-dali, devnet-centauri]
runtime: [devnet-dali-complete, devnet-picasso-complete, devnet-dali, devnet-centauri]
needs:
- package-polkadot-node
- package-acala-node
Expand Down Expand Up @@ -907,19 +854,19 @@ jobs:
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: frontend
working-directory: frontend
- name: Lint Pablo
run: yarn --filter=pablo lint
working-directory: frontend
- name: Test Pablo
run: yarn --filter=pablo test
working-directory: frontend
working-directory: frontend
- name: Lint Picasso
run: yarn --filter=picasso lint
working-directory: frontend
- name: Test Picasso
run: yarn --filter=picasso test
working-directory: frontend
working-directory: frontend

cmc-api:
name: "Package CMC API"
Expand Down Expand Up @@ -1010,7 +957,7 @@ jobs:
- x64
- sre
concurrency:
group: ${{ github.workflow }}-package-zombienet-${{ github.ref }}
group: ${{ github.workflow }}-package-zombienet-${{ github.ref }}
cancel-in-progress: true
container:
image: niteo/nixpkgs-nixos-22.05:316b762afdb9e142a803f29c49a88b4a47db80ee
Expand Down Expand Up @@ -1115,7 +1062,7 @@ jobs:
echo "experimental-features = nix-command flakes" > /etc/nix/nix.conf
echo "sandbox = relaxed" >> /etc/nix/nix.conf
echo "narinfo-cache-negative-ttl = 0" >> /etc/nix/nix.conf
shell: "bash"
shell: "bash"
- uses: cachix/cachix-action@f5f67badd061acb62b5c6e25e763572ca8317004
with:
skipPush: true
Expand All @@ -1127,7 +1074,7 @@ jobs:
name: ${{ env.CACHIX_COMPOSABLE }}
- run: |
nix run .#devnet-integration-tests
effects-gate:
name: "Effect gate, automatically merged if passed"
runs-on:
Expand All @@ -1154,8 +1101,6 @@ jobs:
- cargo-fmt-check
- taplo-check
- prettier-check
# Simnode is flaky, enable once not flaky
# - check-simnode
- benchmarks-check
- spell-check
- docs-check
Expand Down Expand Up @@ -1275,4 +1220,4 @@ jobs:
_For more info on how to use Nix, check out our [Nix docs](https://docs.composable.finance/nix.html)_
Note that the initial build may take about one hour if it has not been cached by our CI yet. Once it is cached, builds should take about one minute. We currently do not provide build caches for ARM machines such as M1 Macs, but building on ARM is supported.
tag: 'Nix commands for this PR'
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b5b75fc

Please sign in to comment.