diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8940146..f2b666c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/.github/workflows/compilation-check.yml b/.github/workflows/compilation-check.yml new file mode 100644 index 00000000..ce357290 --- /dev/null +++ b/.github/workflows/compilation-check.yml @@ -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 diff --git a/.github/workflows/release-cddl.yml b/.github/workflows/release-cddl.yml index b24e4103..5f433b8d 100644 --- a/.github/workflows/release-cddl.yml +++ b/.github/workflows/release-cddl.yml @@ -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