20 Commits

Author SHA1 Message Date
rzadp 9e31aa7f45 checkout first 2024-06-12 13:46:06 +02:00
rzadp 020a6215f1 weird paths in github action container 2024-06-12 13:46:06 +02:00
rzadp dda6c90f10 prerequisites first so we have git 2024-06-12 13:17:51 +02:00
rzadp 8da3cc4b36 remove older debian for now 2024-06-12 13:08:47 +02:00
rzadp 4db40d60dd newer debian 2024-06-12 13:05:15 +02:00
rzadp c0d1854653 no alpine 2024-06-12 12:52:09 +02:00
rzadp 36f68ba1e7 where is it installed? 2024-06-12 12:33:48 +02:00
rzadp 2b014d74d9 path 2024-06-12 12:32:03 +02:00
rzadp 661aa45275 illegal pipefail, use sh 2024-06-12 12:26:59 +02:00
rzadp 4c71889394 change shell 2024-06-12 12:25:47 +02:00
rzadp 7b16ab63a2 debian/ubuntu 2024-06-12 12:12:58 +02:00
rzadp 1ad9a8ce75 debug 2024-06-12 11:52:20 +02:00
rzadp 8a14312e6c extract var 2024-06-12 11:50:39 +02:00
rzadp 99c7623297 use bash? 2024-06-12 11:47:30 +02:00
rzadp b8481443ad debug 2024-06-12 11:44:18 +02:00
rzadp ac7dab67d2 no fail fast 2024-06-12 11:43:05 +02:00
rzadp 6d5360e487 img 2024-06-12 11:42:15 +02:00
rzadp 1aea99df05 bang 2024-06-12 11:41:16 +02:00
rzadp 2d615cbf84 prereq 2024-06-12 11:38:14 +02:00
rzadp becfe54d33 run in container 2024-06-12 11:14:47 +02:00
4 changed files with 40 additions and 14 deletions
+1
View File
@@ -0,0 +1 @@
./ubuntu-prerequisites.sh
+8
View File
@@ -0,0 +1,8 @@
#!/usr/env sh
set -eu
apt-get update
apt-get install -y curl git protobuf-compiler build-essential libclang-15-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
+17 -14
View File
@@ -6,24 +6,27 @@ on:
branches:
- main
- master
- rzadp/prerequisites
jobs:
ci:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
container:
- "ubuntu:22.04"
- "ubuntu:latest"
- "debian:latest"
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
- name: Rust compilation prerequisites
- name: Run the prerequisites script
run: |
sudo apt update
sudo apt install -y \
protobuf-compiler
rustup target add wasm32-unknown-unknown
rustup component add rustfmt clippy rust-src
DIST="$(echo "${{ matrix.container }}" | cut -d':' -f1)"
sh ./.github/scripts/${DIST}-prerequisites.sh
# We've run into out-of-disk error when compiling Polkadot in the next step, so we free up some space this way.
- name: Free Disk Space (Ubuntu)
@@ -38,19 +41,19 @@ jobs:
swap-storage: false
- name: Build the template
run: cargo build
run: /github/home/.cargo/bin/cargo build
timeout-minutes: 90
- name: Run clippy
run: |
SKIP_WASM_BUILD=1 cargo clippy --all-targets --locked --workspace --quiet
SKIP_WASM_BUILD=1 cargo clippy --all-targets --all-features --locked --workspace --quiet
SKIP_WASM_BUILD=1 /github/home/.cargo/bin/cargo clippy --all-targets --locked --workspace --quiet
SKIP_WASM_BUILD=1 /github/home/.cargo/bin/cargo clippy --all-targets --all-features --locked --workspace --quiet
timeout-minutes: 30
- name: Run the tests
run: cargo test
run: /github/home/.cargo/bin/cargo test
timeout-minutes: 15
- name: Build the docs
run: cargo doc --all-features --workspace --no-deps
run: /github/home/.cargo/bin/cargo doc --all-features --workspace --no-deps
timeout-minutes: 15
+14
View File
@@ -0,0 +1,14 @@
[toolchain]
channel = "stable"
components = [
"cargo",
"clippy",
"rust-analyzer",
"rust-src",
"rust-std",
"rustc",
"rustc-dev",
"rustfmt",
]
targets = ["wasm32-unknown-unknown"]
profile = "minimal"