2020-07-25 10:02:06 +02:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-08-14 23:27:47 +02:00
|
|
|
- plugins
|
2020-07-25 10:02:06 +02:00
|
|
|
pull_request: {}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
# typical build with various feature combinations
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
continue-on-error: ${{ matrix.experimental }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest]
|
|
|
|
flags:
|
|
|
|
- ""
|
2021-03-24 12:27:38 +01:00
|
|
|
- "--features metadata,serde,internals"
|
2020-07-25 10:02:06 +02:00
|
|
|
- "--features unchecked"
|
|
|
|
- "--features sync"
|
|
|
|
- "--features no_optimize"
|
|
|
|
- "--features no_float"
|
2020-11-01 08:48:48 +01:00
|
|
|
- "--features f32_float"
|
2021-02-13 13:57:56 +01:00
|
|
|
- "--features decimal"
|
|
|
|
- "--features no_float,decimal"
|
2020-08-06 16:36:36 +02:00
|
|
|
- "--tests --features only_i32"
|
2020-07-25 10:02:06 +02:00
|
|
|
- "--features only_i64"
|
|
|
|
- "--features no_index"
|
|
|
|
- "--features no_object"
|
|
|
|
- "--features no_function"
|
|
|
|
- "--features no_module"
|
2020-08-03 06:10:20 +02:00
|
|
|
- "--features no_closure"
|
2020-07-29 01:38:38 +02:00
|
|
|
- "--features unicode-xid-ident"
|
2021-03-24 12:27:38 +01:00
|
|
|
- "--features sync,no_function,no_float,no_optimize,no_module,no_closure,metadata,serde,unchecked"
|
2021-03-31 04:16:38 +02:00
|
|
|
- "--features no_function,no_float,no_index,no_object,no_optimize,no_module,no_closure,unchecked"
|
2020-07-25 10:02:06 +02:00
|
|
|
toolchain: [stable]
|
|
|
|
experimental: [false]
|
|
|
|
include:
|
|
|
|
# smoketests for future and experimental toolchains
|
|
|
|
- {toolchain: stable, os: windows-latest, experimental: false, flags: ""}
|
|
|
|
- {toolchain: stable, os: macos-latest, experimental: false, flags: ""}
|
|
|
|
- {toolchain: beta, os: ubuntu-latest, experimental: false, flags: ""}
|
|
|
|
- {toolchain: nightly, os: ubuntu-latest, experimental: true, flags: ""}
|
2020-08-07 02:09:13 +02:00
|
|
|
fail-fast: false
|
2020-07-25 10:02:06 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: ${{matrix.toolchain}}
|
|
|
|
override: true
|
|
|
|
- name: Test
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
2020-09-08 23:24:08 +02:00
|
|
|
args: ${{matrix.flags}}
|
2020-07-25 10:02:06 +02:00
|
|
|
# no-std builds are a bit more extensive to test
|
|
|
|
no_std_build:
|
|
|
|
name: NoStdBuild
|
|
|
|
runs-on: ${{matrix.os}}
|
2020-07-25 10:48:29 +02:00
|
|
|
continue-on-error: ${{matrix.experimental}}
|
2020-07-25 10:02:06 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-07-25 10:48:29 +02:00
|
|
|
include:
|
|
|
|
- {os: ubuntu-latest, flags: "--profile unix -Z unstable-options", experimental: false}
|
|
|
|
- {os: windows-latest, flags: "--profile windows -Z unstable-options", experimental: true}
|
|
|
|
- {os: macos-latest, flags: "--profile macos -Z unstable-options", experimental: false}
|
2020-07-25 10:02:06 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: nightly
|
|
|
|
override: true
|
|
|
|
- name: Build Project
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
2020-07-25 10:48:29 +02:00
|
|
|
args: --manifest-path=no_std/no_std_test/Cargo.toml ${{matrix.flags}}
|
2020-09-20 19:47:31 +02:00
|
|
|
rustfmt:
|
|
|
|
name: Check Formatting
|
|
|
|
runs-on: windows-latest
|
|
|
|
continue-on-error: true
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: nightly
|
|
|
|
override: true
|
|
|
|
components: rustfmt, clippy
|
|
|
|
- name: Run Rustfmt
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|
2020-09-20 20:11:15 +02:00
|
|
|
- name: Run Clippy
|
2020-09-20 19:47:31 +02:00
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: clippy
|
2020-09-20 20:11:15 +02:00
|
|
|
args: --all -- -Aclippy::all -Dclippy::perf
|
2020-08-01 18:52:26 +02:00
|
|
|
codegen_build:
|
|
|
|
name: Codegen Build
|
|
|
|
runs-on: ${{matrix.os}}
|
|
|
|
continue-on-error: ${{matrix.experimental}}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
2021-03-31 04:30:52 +02:00
|
|
|
- {toolchain: nightly, os: ubuntu-latest, experimental: false, flags: "--features metadata"}
|
|
|
|
- {toolchain: nightly, os: windows-latest, experimental: false, flags: "--features metadata"}
|
2020-08-01 18:52:26 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: ${{matrix.toolchain}}
|
|
|
|
override: true
|
|
|
|
- name: Build Project
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --manifest-path=codegen/Cargo.toml ${{matrix.flags}}
|