Skip to content

Commit

Permalink
re-usable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
anweiss committed Oct 6, 2021
1 parent 60a196b commit 1eb7387
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 62 deletions.
29 changes: 1 addition & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,34 +54,7 @@ jobs:
args: --all --bins --examples --tests --no-default-features

compilation-check:
strategy:
matrix:
rust_toolchain: [stable, beta]
os: [ubuntu-latest, macOS-latest, windows-latest]
name: Compilation check
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust_toolchain }}
override: true

- name: Check compilation with default features
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --examples --tests

- name: Check compilation with no features
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --examples --tests --no-default-features
uses: anweiss/cddl/.github/workflows/compilation-check.yml@main

wasm-compilation-check:
strategy:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/compilation-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Compilation check

on:
workflow_call:

jobs:
compilation-check:
strategy:
matrix:
rust_toolchain: [stable]
os: [ubuntu-latest, macOS-latest, windows-latest]
name: Compilation check
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust_toolchain }}
override: true

- name: Check compilation with default features
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --examples --tests

- name: Check compilation with no features
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --examples --tests --no-default-features
35 changes: 1 addition & 34 deletions .github/workflows/release-cddl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,7 @@ on:

jobs:
compilation-check:
name: Build and test binaries
strategy:
matrix:
rust_toolchain: [stable]
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust_toolchain }}
override: true

- name: Check compilation with default features
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --examples --tests

- name: Check compilation with no features
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --examples --tests --no-default-features

- name: cargo +${{ matrix.rust_toolchain }} test ${{ matrix.os }}
uses: actions-rs/cargo@v1
with:
command: test
args: --all
uses: anweiss/cddl/.github/workflows/compilation-check.yml@main

cargo-publish-dry-run:
name: Cargo publish dry run
Expand Down

0 comments on commit 1eb7387

Please sign in to comment.