Skip to content

GH-685 New Defaults and Blockchain service URL check #1937

GH-685 New Defaults and Blockchain service URL check

GH-685 New Defaults and Blockchain service URL check #1937

Workflow file for this run

name: ci-matrix
on:
pull_request:
types: [opened, reopened, synchronize]
branches:
- master
jobs:
build:
if: github.event.pull_request.draft == false
strategy:
fail-fast: true
matrix:
target:
- { name: linux, os: ubuntu-22.04 }
- { name: macos, os: macos-13 }
- { name: windows, os: windows-2022 }
name: Build node on ${{ matrix.target.os }}
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Print source branch name
run: |
echo "Source branch: ${{ github.head_ref }}"
shell: bash
- name: Stable with rustfmt and clippy
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.63.0
components: rustfmt, clippy
override: true
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/cache/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build ${{ matrix.target.os }}
run: |
git fetch
./ci/all.sh
./ci/multinode_integration_test.sh
./ci/collect_results.sh
shell: bash
- name: Publish ${{ matrix.target.os }}
uses: actions/upload-artifact@v4
with:
name: Node-${{ matrix.target.name }}
path: results
- name: diagnostics
if: failure()
run: |
echo "final disc diagnostics ------>"
df -h /Users/runner/work/Node/Node/node/target/release
deploy_to_s3:
needs: build
if: success() && (startsWith(github.head_ref, 'GH') || startsWith(github.head_ref, 'v'))
strategy:
matrix:
os: [linux, macos, windows]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 1
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R
- name: Check artifacts exist
run: |
if [ ! -d "Node-${{ matrix.os }}/generated/bin/" ]; then
echo "Error: Build artifacts not found"
exit 1
fi
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- if: startsWith(github.head_ref, 'GH')
name: Versioned S3 Sync
run: |
aws s3 sync "Node-${{ matrix.os }}/generated/bin/" "s3://${{ secrets.AWS_S3_BUCKET }}/Node/${{ github.head_ref }}/Node-${{ matrix.os }}" \
--delete \
--no-progress \
--acl private
- if: startsWith(github.head_ref, 'v')
name: Latest S3 Sync
run: |
aws s3 sync "Node-${{ matrix.os }}/generated/bin/" "s3://${{ secrets.AWS_S3_BUCKET }}/Node/latest/Node-${{ matrix.os }}" \
--delete \
--no-progress \
--acl private
- name: Invalidate Binaries CloudFront
uses: chetan/invalidate-cloudfront-action@v2.4
env:
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
PATHS: "/Node*"
AWS_REGION: "us-west-2"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}