diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..1f4b21c6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: build-vane +on: + workflow_dispatch: + push: + branches: + - main + paths-ignore: + - "**.md" + pull_request: + branches: + - main + paths-ignore: + - "**.md" + +jobs: + build-vane: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Install minimal nightly Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2023-05-22 + target: wasm32-unknown-unknown + override: true + + - name: Clean unused directories + run: sudo rm -rf /usr/share/dotnet;sudo rm -rf /opt/ghc;sudo rm -rf "/usr/local/share/boost";sudo rm -rf "$AGENT_TOOLSDIRECTORY" + + - name: Install Protobuf + run: sudo apt install protobuf-compiler + + - name: Run build + run: cargo build diff --git a/.github/workflows/test-and-lint.yml b/.github/workflows/test-and-lint.yml deleted file mode 100644 index db373630..00000000 --- a/.github/workflows/test-and-lint.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Testing and Linter - -on: - push: - branches: - - release-** - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - -jobs: - build: - name: "Test and Lint" - runs-on: ubuntu-latest - steps: - - name: Free up space on runner - run: | - sudo rm -rf /usr/share/dotnet - sudo rm -rf /opt/ghc - sudo rm -rf "/usr/local/share/boost" - sudo rm -rf "$AGENT_TOOLSDIRECTORY" - - - name: Rust Setup - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - target: wasm32-unknown-unknown - override: true - components: rustfmt, clippy - - - name: Install protoc - run: | - sudo apt-get install -y protobuf-compiler - protoc --version - - - uses: actions/checkout@v3 - - - name: Rustfmt - uses: actions-rs/cargo@v1 - with: - toolchain: stable - command: fmt - args: --all --check - - - name: Rust Cache - uses: Swatinem/rust-cache@v2.5.0 - with: - cache-on-failure: true - cache-all-crates: true - - - name: Check Build - run: | - cargo check --release - - - name: Run tests - run: cargo test --locked --verbose --all - - - name: Check try-runtime build - run: cargo check --release --features=try-runtime - - - name: Ensure benchmarking compiles - run: > - pushd node && - cargo check --release --features=runtime-benchmarks