Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Wasmtime downgrade fix (#91)
Browse files Browse the repository at this point in the history
* fix windows tests for wasmtime by downgrading

* update sdk and fix workflow

* remove caching
  • Loading branch information
ozgunozerk authored Dec 21, 2022
1 parent 5932a4c commit 814958f
Show file tree
Hide file tree
Showing 3 changed files with 457 additions and 572 deletions.
50 changes: 28 additions & 22 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,44 @@
name: "ci tests"


on:
push:
branches:
- main
paths-ignore:
- '**.md'
- "**.md"
pull_request:
paths-ignore:
- '**.md'
- "**.md"
workflow_dispatch:
inputs:
test-macos-and-windows:
description: 'run macOS and Windows tests'
description: "run macOS and Windows tests"
required: true
default: false
type: boolean

env:
# Not needed in CI, should make things a bit faster
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
# Build smaller artifacts to avoid running out of space in CI
# TODO: Try to remove once https://github.com/paritytech/substrate/issues/11538 is resolved
RUSTFLAGS: -C strip=symbols -C opt-level=s
# Remove unnecessary WASM build artefacts
WASM_BUILD_CLEAN_TARGET: 1

jobs:
clippy-fmt:
clippy-fmt-test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- macos-12
- windows-2022
run-all:
run-all:
- ${{ inputs.test-macos-and-windows == true || github.ref == 'refs/heads/main' }}
exclude: # exclude macos-12 and windows-2022 when the condition is false
exclude: # exclude macos-12 and windows-2022 when the condition is false
- run-all: false
os: macos-12
- run-all: false
Expand All @@ -45,36 +49,38 @@ jobs:
- name: git checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # @v3.1.0

- name: Configure cache
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # @v3.0.11
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}

- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@665aaf9d6fba342a852f55fecc5688e7f00e6663 # v1.6.0
with:
version: "14.0"

# Workaround to resolve link error with C:\msys64\mingw64\bin\libclang.dll
- name: Remove msys64
run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
if: runner.os == 'Windows'

- name: cargo fmt
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1
with:
command: fmt
args: --all -- --check

- name: cargo clippy
uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # @v1.0.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --locked --all-targets -- -D warnings

- name: cargo test --locked
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1
with:
command: test

- name: cargo clippy --locked
uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # @v1.0.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --locked --all-targets -- -D warnings

- name: Check Documentation
run: cargo doc --locked --all --no-deps
env:
Expand Down
Loading

0 comments on commit 814958f

Please sign in to comment.