fix: PinkCodePromise does not handle the uint8array wasm source code as expected #4462
Workflow file for this run
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
name: Build and Test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
YARN_ENABLE_IMMUTABLE_INSTALLS: false | |
jobs: | |
build-core: | |
name: Build core | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@master # https://github.com/easimon/maximize-build-space | |
with: | |
root-reserve-mb: 4096 | |
temp-reserve-mb: 1024 | |
swap-size-mb: 8192 | |
remove-dotnet: "true" | |
remove-android: "true" | |
remove-haskell: "true" | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- uses: ./.github/actions/build-core | |
build-pruntime: | |
name: Build pruntime | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@master # https://github.com/easimon/maximize-build-space | |
with: | |
root-reserve-mb: 4096 | |
temp-reserve-mb: 1024 | |
swap-size-mb: 8192 | |
remove-dotnet: "true" | |
remove-android: "true" | |
remove-haskell: "true" | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- uses: ./.github/actions/build-pruntime | |
build-prouter: | |
name: Build prouter | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@master # https://github.com/easimon/maximize-build-space | |
with: | |
root-reserve-mb: 4096 | |
temp-reserve-mb: 1024 | |
swap-size-mb: 8192 | |
remove-dotnet: "true" | |
remove-android: "true" | |
remove-haskell: "true" | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- uses: ./.github/actions/build-prouter | |
build-contracts: | |
name: Build contracts | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- uses: ./.github/actions/build-contracts | |
e2e-test: | |
name: Run E2E tests | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@master # https://github.com/easimon/maximize-build-space | |
with: | |
root-reserve-mb: 4096 | |
temp-reserve-mb: 1024 | |
swap-size-mb: 8192 | |
remove-dotnet: "true" | |
remove-android: "true" | |
remove-haskell: "true" | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- uses: ./.github/actions/install_toolchain | |
- name: Install gramine | |
run: sudo bash dockerfile.d/01_apt_gramine.sh | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install yarn 2 | |
run: sudo npm install -g yarn && yarn set version berry | |
- name: Download core-blockchain binaries | |
uses: actions/download-artifact@v3 | |
with: | |
name: core-blockchain-binaries | |
path: ./target/release | |
- name: Download pruntime binaries | |
uses: actions/download-artifact@v3 | |
with: | |
name: pruntime-binaries | |
path: ./standalone/pruntime/bin | |
- name: Download contract binaries | |
uses: actions/download-artifact@v3 | |
with: | |
name: contract-binaries | |
path: ./e2e/res | |
- name: Build JS-SDK | |
run: cd ./frontend/packages/sdk && yarn && yarn build | |
- name: Change permission | |
run: chmod +x ./target/release/phala-node ./target/release/pherry ./standalone/pruntime/bin/pruntime | |
- name: Run E2E tests | |
run: yarn set version berry && cd ./e2e/ && yarn && yarn build:proto && yarn test | |
- name: Pack logs if failed | |
if: failure() | |
run: tar czvf e2e-logs.tar.gz e2e | |
- name: Upload logs if failed | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: e2e-logs | |
path: e2e-logs.tar.gz | |
needs: [ build-core, build-pruntime, build-contracts ] | |
cargo-tests: | |
name: Run cargo tests | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@master # https://github.com/easimon/maximize-build-space | |
with: | |
root-reserve-mb: 4096 | |
temp-reserve-mb: 1024 | |
swap-size-mb: 8192 | |
remove-dotnet: "true" | |
remove-android: "true" | |
remove-haskell: "true" | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- uses: ./.github/actions/install_toolchain | |
- name: Run cargo tests | |
run: cargo test --tests --release --workspace --exclude node-executor --exclude phala-node | |
cargo-clippy: | |
name: Run cargo clippy | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@master # https://github.com/easimon/maximize-build-space | |
with: | |
root-reserve-mb: 4096 | |
temp-reserve-mb: 1024 | |
swap-size-mb: 8192 | |
remove-dotnet: "true" | |
remove-android: "true" | |
remove-haskell: "true" | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- uses: ./.github/actions/install_toolchain | |
- name: Install clippy | |
run: rustup component add clippy | |
- name: Run cargo clippy | |
run: cargo clippy --tests -- -D warnings && cd standalone/pruntime && cargo clippy --tests -- -D warnings |