Skip to content

Commit

Permalink
Improve CI (polkadot-evm#648)
Browse files Browse the repository at this point in the history
* Improve CI

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Use nightly-2022-05-02

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Remove useless submodule

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Make test more stable

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Some nits

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* remove strategy

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
  • Loading branch information
koushiro authored May 11, 2022
1 parent f1b2242 commit b370c60
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 88 deletions.
74 changes: 36 additions & 38 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,46 @@
name: Docs

on:
push:
branches:
- master
push:
branches: [ master ]

jobs:
release:
name: Deploy docs
runs-on: ubuntu-latest
release:
name: Deploy docs
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Rust Setup
run: |
scripts/init.sh
cargo --version
rustc --version
cargo +$WASM_BUILD_TOOLCHAIN --version
rustc +$WASM_BUILD_TOOLCHAIN --version
env:
WASM_BUILD_TOOLCHAIN: nightly-2022-02-07
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Rust Setup
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-05-02
target: wasm32-unknown-unknown
override: true
components: rust-docs

- name: Build website
run: |
cd docs
yarn install
yarn run build
- name: Build website
run: |
cd docs
yarn install
yarn run build
- name: Build rustdocs
uses: actions-rs/cargo@v1
with:
command: doc
args: --all --no-deps
- name: Build rustdocs
uses: actions-rs/cargo@v1
with:
command: doc
args: --all --no-deps

- name: Copy rustdocs
run: |
cp -r ./target/doc docs/.vuepress/dist/rustdocs
- name: Copy rustdocs
run: |
cp -r ./target/doc docs/.vuepress/dist/rustdocs
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
publish_dir: ./docs/.vuepress/dist
keep_files: true
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
publish_dir: ./docs/.vuepress/dist
keep_files: true
61 changes: 27 additions & 34 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Submodules
run: git submodule update --init --recursive
- name: Init
run: |
scripts/init.sh
cargo --version
rustc --version
cargo +$WASM_BUILD_TOOLCHAIN --version
rustc +$WASM_BUILD_TOOLCHAIN --version
env:
WASM_BUILD_TOOLCHAIN: nightly-2022-02-07
- name: Rust Setup
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-05-02
target: wasm32-unknown-unknown
override: true
- name: Run tests
run: cargo test --locked --verbose --all

integration:
name: 'Run integration tests'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Submodules
run: git submodule update --init --recursive
- name: Init
run: |
scripts/init.sh
cargo --version
rustc --version
cargo +$WASM_BUILD_TOOLCHAIN --version
rustc +$WASM_BUILD_TOOLCHAIN --version
env:
WASM_BUILD_TOOLCHAIN: nightly-2022-02-07
- name: Rust Setup
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-05-02
target: wasm32-unknown-unknown
override: true
- name: Build manual seal client
run: cd template/node && cargo build --release --locked --verbose --no-default-features --features manual-seal,rpc_binary_search_estimate
run: |
cd template/node
cargo build --release --locked --verbose --no-default-features --features manual-seal,rpc_binary_search_estimate
- name: Use Node.js 10
uses: actions/setup-node@v1
with:
Expand All @@ -55,21 +50,19 @@ jobs:
run: cd ts-tests && npm install
- name: Run functional tests
run: cd ts-tests && npm run build && npm run test

lint:
name: 'Run lints'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Submodules
run: git submodule update --init --recursive
- name: Init
run: |
scripts/init.sh
cargo --version
rustc --version
cargo +$WASM_BUILD_TOOLCHAIN --version
rustc +$WASM_BUILD_TOOLCHAIN --version
env:
WASM_BUILD_TOOLCHAIN: nightly-2022-02-07
- name: Rust Setup
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-05-02
target: wasm32-unknown-unknown
override: true
components: rustfmt
- name: Rustfmt
run: cargo fmt --all -- --check
Empty file removed .gitmodules
Empty file.
16 changes: 0 additions & 16 deletions scripts/init.sh

This file was deleted.

0 comments on commit b370c60

Please sign in to comment.