Merge pull request #145 from terminusdb/i32_cast #608
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build the crate, run the tests, and check the code format. | |
name: Build and test | |
on: | |
push: | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
jobs: | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/clippy-check@v1 | |
continue-on-error: true | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features | |
build-and-test: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
shell: bash | |
- os: macos-latest | |
shell: bash | |
- os: windows-latest | |
shell: msys2 | |
defaults: | |
run: | |
shell: ${{ matrix.shell}} {0} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install msys2 for Windows | |
if: ${{ matrix.os == 'windows-latest' }} | |
uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: >- | |
diffutils | |
m4 | |
make | |
gmp | |
gmp-devel | |
mingw-w64-x86_64-gcc | |
mingw-w64-x86_64-rust | |
# Create the crate and build it. We use this instead of `cargo build`, | |
# because it can help catch errors in the `Cargo.toml`. | |
- name: Build the crate | |
run: cargo package --verbose | |
- name: Build and run tests | |
run: cargo test --verbose | |
- name: Check code format | |
if: matrix.os == 'ubuntu-latest' # No need to do this on every OS. | |
run: cargo fmt -- --check |