Polkadot v0.9.43 (#1577) #5883
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
on: | |
push: | |
branches: [main, 'release-v**'] | |
pull_request: | |
name: Build | |
jobs: | |
matrix_prep: | |
name: matrix-prep | |
runs-on: 'ubuntu-latest' | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
# Required as the JSON input file needs to be read | |
- uses: actions/checkout@v3 | |
- id: set-matrix | |
uses: JoshuaTheMiller/conditional-build-matrix@9ff11e2cad4aa166e1d1d834097121a969da8276 | |
with: | |
inputFile: '.github/workflows/build-matrix.json' | |
# we run build-node on every workflow but build-runtime only on pushes to branches | |
filter: '[?run_on_event==`any` || run_on_event==`${{ github.event_name }}`]' | |
build: | |
needs: matrix_prep | |
strategy: | |
matrix: ${{fromJson(needs.matrix_prep.outputs.matrix)}} | |
name: ${{ matrix.target }} | |
runs-on: ${{ matrix.os }} | |
env: | |
RUST_TOOLCHAIN: "nightly-2023-10-26" | |
steps: | |
- name: Prep build on Ubuntu | |
if: ${{ matrix.os }} == 'ubuntu-latest' | |
run: | | |
echo "Pre cleanup" | |
df -h | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
echo "Post cleanup" | |
df -h | |
sudo apt-get install protobuf-compiler | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Install latest nightly | |
uses: actions-rs/toolchain@88dc2356392166efad76775c878094f4e83ff746 | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
default: true | |
- if: startsWith(matrix.target, 'build-runtime') | |
uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c | |
with: # cache the runtime target instead of root target for build-runtime | |
working-directory: './runtime' | |
target-dir: './target/srtool' | |
- if: matrix.target == 'build-node' | |
uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c | |
- name: ${{ matrix.target }} | |
run: ./ci/script.sh | |
env: | |
TARGET: ${{ matrix.target }} | |
RUST_TOOLCHAIN: ${{ matrix.rust_toolchain }} | |
PACKAGE: ${{matrix.package}} | |
- if: startsWith(matrix.target, 'build-runtime') | |
name: Setup - gcloud / gsutil | |
uses: google-github-actions/setup-gcloud@v0 | |
with: | |
service_account_key: ${{ secrets.GCS_SA_KEY }} | |
project_id: ${{ secrets.GCS_PROJECT }} | |
export_default_credentials: true | |
- if: ${{ matrix.target == 'build-runtime' && matrix.package == 'altair-runtime' }} | |
name: Publish to GCS | |
run: | | |
gsutil cp ./runtime/altair/target/srtool/release/wbuild/altair-runtime/altair_runtime.compact.compressed.wasm gs://centrifuge-artifact-releases/parachain/altair_runtime-$(git rev-parse --short HEAD).compact.compressed.wasm | |
- if: ${{ matrix.target == 'build-runtime-fast' && matrix.package == 'altair-runtime' }} | |
name: Publish to GCS | |
run: | | |
gsutil cp ./runtime/altair/target/srtool/release/wbuild/altair-runtime/altair_runtime.compact.compressed.wasm gs://centrifuge-artifact-releases/test-parachain/altair_runtime-$(git rev-parse --short HEAD).compact.compressed.wasm | |
- if: ${{ matrix.target == 'build-runtime' && matrix.package == 'centrifuge-runtime' }} | |
name: Publish to GCS | |
run: | | |
gsutil cp ./runtime/centrifuge/target/srtool/release/wbuild/centrifuge-runtime/centrifuge_runtime.compact.compressed.wasm gs://centrifuge-artifact-releases/parachain/centrifuge_runtime-$(git rev-parse --short HEAD).compact.compressed.wasm | |
- if: ${{ matrix.target == 'build-runtime-fast' && matrix.package == 'centrifuge-runtime' }} | |
name: Publish to GCS | |
run: | | |
gsutil cp ./runtime/centrifuge/target/srtool/release/wbuild/centrifuge-runtime/centrifuge_runtime.compact.compressed.wasm gs://centrifuge-artifact-releases/test-parachain/centrifuge_runtime-$(git rev-parse --short HEAD).compact.compressed.wasm |