fix: Don't use spinner when building wasm on CI (#5208) #1591
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: I2::Dev::Publish | |
on: | |
push: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
DEFAULTS_DIR: defaults | |
WASM_TARGET_DIR: wasm/target/prebuilt | |
ARTIFACTS_DIR: tmp/artifacts | |
BIN_PATH: /usr/local/bin | |
jobs: | |
build_wasm_libs: | |
runs-on: ubuntu-latest | |
container: | |
image: hyperledger/iroha2-ci:nightly-2024-09-09 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build wasm libs | |
run: ./scripts/build_wasm.sh libs | |
- name: Upload wasm libs to reuse in other jobs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wasm-libs | |
path: ${{ env.WASM_TARGET_DIR }}/libs | |
registry_save_build_artifacts: | |
runs-on: [self-hosted, Linux, iroha2] | |
container: | |
image: hyperledger/iroha2-ci:nightly-2024-09-09 | |
needs: build_wasm_libs | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download wasm libs | |
uses: actions/download-artifact@v4 | |
with: | |
name: wasm-libs | |
path: ${{ env.DEFAULTS_DIR }}/libs | |
- name: Move the default executor | |
run: mv ${{ env.DEFAULTS_DIR }}/libs/default_executor.wasm ${{ env.DEFAULTS_DIR }}/executor.wasm | |
- name: Set up Docker Buildx | |
id: buildx | |
if: always() | |
uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to Soramitsu Harbor | |
uses: docker/login-action@v3 | |
with: | |
registry: docker.soramitsu.co.jp | |
username: ${{ secrets.HARBOR_USERNAME }} | |
password: ${{ secrets.HARBOR_TOKEN }} | |
- name: Build and push iroha2:dev image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile.glibc | |
push: true | |
tags: | | |
hyperledger/iroha:dev | |
docker.soramitsu.co.jp/iroha2/iroha:dev | |
labels: commit=${{ github.sha }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Copy artifacts from iroha image | |
run: | | |
mkdir -p ${{ env.ARTIFACTS_DIR }} | |
docker run --rm --entrypoint cat hyperledger/iroha:dev ${{ env.BIN_PATH }}/iroha > ${{ env.ARTIFACTS_DIR }}/iroha | |
docker run --rm --entrypoint cat hyperledger/iroha:dev ${{ env.BIN_PATH }}/irohad > ${{ env.ARTIFACTS_DIR }}/irohad | |
docker run --rm --entrypoint cat hyperledger/iroha:dev ${{ env.BIN_PATH }}/kagami > ${{ env.ARTIFACTS_DIR }}/kagami | |
- name: Generate schema | |
run: cargo run --bin kagami -- schema > ${{ env.ARTIFACTS_DIR }}/schema.json | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: iroha_binaries_and_schema | |
path: ${{ env.ARTIFACTS_DIR }} | |
- name: Trigger python SDK tests | |
run: | | |
curl -L \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.REPO_ACCESS_TOKEN }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/hyperledger-iroha/iroha-python/dispatches \ | |
-d '{"event_type":"dispatch-event"}' | |
telemetry: | |
# FIXME #2646 | |
if: false | |
runs-on: ubuntu-latest | |
container: | |
image: hyperledger/iroha2-ci:nightly-2024-09-09 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run debug tests and save telemetry | |
env: | |
TELEMETRY_FILE: ../target/telemetry/debug.json.lz4 | |
run: | | |
mkdir -p target/telemetry | |
mold --run cargo test -p iroha --all-features -- unstable_network || true | |
- name: Run release tests and save telemetry | |
env: | |
TELEMETRY_FILE: ../target/telemetry/release.json.lz4 | |
run: mold --run cargo test -p iroha --all-features --release -- unstable_network || true | |
- name: Install script dependencies | |
run: | | |
apt-get update | |
apt-get install -y --no-install-recommends lz4 jq | |
- name: Print debug telemetry info | |
run: | | |
./scripts/analyze_telemetry.sh target/telemetry/debug.json.lz4 >target/telemetry/debug.md | |
- name: Print release telemetry info | |
run: ./scripts/analyze_telemetry.sh target/telemetry/release.json.lz4 >target/telemetry/release.md | |
- name: Print debug telemetry info | |
run: | | |
echo '## Debug build' | |
cat target/telemetry/debug.md | |
- name: Print release telemetry info | |
run: | | |
echo '## Release build' | |
cat target/telemetry/release.md | |
- name: Create telemetry comment | |
uses: actions-ecosystem/action-create-comment@v1 | |
with: | |
body: | | |
\# Telemetry info | |
\## Debug build | |
${{ steps.debug-telemetry.outputs.body }} | |
\## Release build | |
${{ steps.release-telemetry.outputs.body }} | |
github_token: ${{ secrets.github_token }} | |
continue-on-error: true | |
- name: Archive telemetry | |
uses: actions/upload-artifact@v4 | |
with: | |
name: telemetry | |
path: target/telemetry |