diff --git a/.github/workflows/build-debian-11-binary.yml b/.github/workflows/build-debian-11-binary.yml index 2404f6c8..9795ded2 100644 --- a/.github/workflows/build-debian-11-binary.yml +++ b/.github/workflows/build-debian-11-binary.yml @@ -30,6 +30,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: assets-for-download - path: output - - \ No newline at end of file + path: output \ No newline at end of file diff --git a/.github/workflows/build-ubuntu-2204-binary.yml b/.github/workflows/build-ubuntu-2204-binary.yml index 51f6f198..f38421bf 100644 --- a/.github/workflows/build-ubuntu-2204-binary.yml +++ b/.github/workflows/build-ubuntu-2204-binary.yml @@ -31,5 +31,3 @@ jobs: with: name: assets-for-download path: output - - \ No newline at end of file diff --git a/.github/workflows/ci-ondemand.yml b/.github/workflows/ci-ondemand.yml new file mode 100644 index 00000000..0bd50a5e --- /dev/null +++ b/.github/workflows/ci-ondemand.yml @@ -0,0 +1,79 @@ +name: Ternoa Node CI + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-22.04 + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Get submodules + run: git submodule update --init --recursive + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2022-04-24 + components: rustfmt, llvm-tools-preview + target: wasm32-unknown-unknown + default: true + + - name: Install protoc + run: | + sudo apt-get update + sudo apt-get install -y protobuf-compiler + + - name: Cache restore + uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Clean + run: cargo clean + + - name: Check format + run: cargo fmt --all -- --check + + - name: Check release + run: cargo check --release + + - name: Tests + run: cargo test --all + + - name: Build + run: cargo build --locked --release + + - name: Upload WASM Alphanet + uses: actions/upload-artifact@v3 + with: + name: assets-for-download-alphanet + path: target/release/wbuild/alphanet-runtime/alphanet_runtime.compact.compressed.wasm + + - name: Upload WASM Mainnet + uses: actions/upload-artifact@v3 + with: + name: assets-for-download-mainnet + path: target/release/wbuild/mainnet-runtime/mainnet_runtime.compact.compressed.wasm + + - name: Upload Binary Alphanet + uses: actions/upload-artifact@v3 + with: + name: assets-for-download-alphanet + path: target/release/wbuild/alphanet-runtime/alphanet_runtime.compact.compressed.wasm + + - name: Upload Binary Mainnet + uses: actions/upload-artifact@v3 + with: + name: assets-for-download-mainnet + path: target/release/wbuild/mainnet-runtime/mainnet_runtime.compact.compressed.wasm diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..014a4edf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +name: Ternoa Node CI + +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-22.04 + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Get submodules + run: git submodule update --init --recursive + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2022-04-24 + components: rustfmt, llvm-tools-preview + target: wasm32-unknown-unknown + default: true + + - name: Install protoc + run: | + sudo apt-get update + sudo apt-get install -y protobuf-compiler + + - name: Cache restore + uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Clean + run: cargo clean + + - name: Check format + run: cargo fmt --all -- --check + + - name: Tests + run: cargo test --all