rhai/.github/workflows/build.yml

133 lines
4.7 KiB
YAML
Raw Normal View History

name: Build
on:
push:
branches:
2022-01-27 09:57:47 +01:00
- main
2021-08-21 04:09:32 +02:00
- master
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:
- ""
2022-01-29 01:51:09 +01:00
- "--features debugging"
- "--features metadata,serde,internals"
2022-01-29 01:51:09 +01:00
- "--features unchecked,serde,metadata,internals,debugging"
- "--features sync,serde,metadata,internals,debugging"
- "--features no_position,serde,metadata,internals,debugging"
- "--features no_optimize,serde,metadata,internals,debugging"
- "--features no_float,serde,metadata,internals,debugging"
- "--features f32_float,serde,metadata,internals,debugging"
- "--features decimal,serde,metadata,internals,debugging"
2022-07-05 16:59:03 +02:00
- "--features no_custom_syntax,serde,metadata,internals,debugging"
2021-02-13 13:57:56 +01:00
- "--features no_float,decimal"
2022-01-29 01:51:09 +01:00
- "--tests --features only_i32,serde,metadata,internals,debugging"
- "--features only_i64,serde,metadata,internals,debugging"
- "--features no_index,serde,metadata,internals,debugging"
- "--features no_object,serde,metadata,internals,debugging"
- "--features no_function,serde,metadata,internals,debugging"
- "--features no_module,serde,metadata,internals,debugging"
- "--features no_closure,serde,metadata,internals,debugging"
- "--features unicode-xid-ident,serde,metadata,internals,debugging"
2022-07-05 16:59:03 +02:00
- "--features sync,no_function,no_float,no_position,no_optimize,no_module,no_closure,no_custom_syntax,metadata,serde,unchecked,debugging"
- "--features no_function,no_float,no_position,no_index,no_object,no_optimize,no_module,no_closure,no_custom_syntax,unchecked"
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: ""}
fail-fast: false
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}}
# no-std builds are a bit more extensive to test
no_std_build:
name: NoStdBuild
runs-on: ${{matrix.os}}
continue-on-error: ${{matrix.experimental}}
strategy:
matrix:
include:
2022-01-22 10:27:18 +01:00
- {os: ubuntu-latest, flags: "--profile unix", experimental: false}
- {os: windows-latest, flags: "--profile windows", experimental: true}
- {os: macos-latest, flags: "--profile macos", experimental: false}
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
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}}