fix(CI/CD): modify CI/CD pipeline #1
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 | |
on: | |
push: | |
branches: | |
- "**" # target all branches | |
pull_request: | |
branches: | |
- master | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_LOG: debug | |
RUST_BACKTRACE: full | |
jobs: | |
build_windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install python toml package | |
run: python3 -m pip install toml | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "20" | |
- name: Install Tauri dependencies | |
run: npm install -g yarn && yarn global add @tauri-apps/cli | |
- name: Install Frontend dependencies | |
run: yarn install | |
- name: Build | |
run: yarn tauri build | |
- name: Run tests | |
run: cd src-tauri && cargo test --release --workspace | |
- name: Run doc tests | |
run: cd src-tauri && cargo test --release --doc | |
- name: Run mixed_sighash_types test | |
run: cd src-tauri && cargo test --release mixed_sighash_types | |
- name: Run test_4opc_sequences test | |
run: cd src-tauri && cargo test --release test_4opc_sequences -- --ignored | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: windows-functional-test-artifacts | |
path: src-tauri/target/tmp | |
build_ubuntu: | |
env: | |
ML_CONTAINERIZED_TESTS: 1 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Update local dependency repositories | |
run: sudo apt-get update | |
- name: Install dependencies | |
run: sudo apt-get install -yqq --no-install-recommends build-essential python3 python3-toml podman | |
- name: Install rust deps | |
run: sudo apt-get install -yqq pkg-config libssl-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "20" | |
- name: Install Tauri dependencies | |
run: npm install -g yarn && yarn global add @tauri-apps/cli | |
- name: Install Frontend dependencies | |
run: yarn install | |
- name: Build | |
run: yarn tauri build | |
- name: Run tests | |
run: cd src-tauri && cargo test --release --workspace | |
- name: Run doc tests | |
run: cd src-tauri && cargo test --release --doc | |
- name: Run mixed_sighash_types test | |
run: cd src-tauri && cargo test --release mixed_sighash_types | |
- name: Run test_4opc_sequences test | |
run: cd src-tauri && cargo test --release test_4opc_sequences | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ubuntu-functional-test-artifacts | |
path: src-tauri/target/tmp | |
build_macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install python toml package | |
run: python3 -m pip install toml --break-system-packages --user | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: "aarch64-apple-darwin, x86_64-apple-darwin" | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "20" | |
- name: Install Tauri dependencies | |
run: npm install -g yarn && yarn global add @tauri-apps/cli | |
- name: Install Frontend dependencies | |
run: yarn install | |
- name: Build | |
run: yarn tauri build | |
- name: Run tests | |
run: cd src-tauri && cargo test --release --workspace | |
- name: Run doc tests | |
run: cd src-tauri && cargo test --release --doc | |
- name: Run mixed_sighash_types test | |
run: cd src-tauri && cargo test --release mixed_sighash_types | |
- name: Run test_4opc_sequences test | |
run: cd src-tauri && cargo test --release test_4opc_sequences | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: macos-functional-test-artifacts | |
path: src-tauri/target/tmp |