Skip to content

Serialize record as tuple #71

Serialize record as tuple

Serialize record as tuple #71

Workflow file for this run

name: Continuous Integration
on:
workflow_dispatch:
push:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Rust ${{ matrix.rust }}
runs-on: ubuntu-latest
outputs:
passed_rustfmt: ${{ steps.rustfmt.outputs.passed_rustfmt }}
passed_clippy: ${{ steps.clippy.outputs.passed_clippy }}
strategy:
fail-fast: false
matrix:
rust: [1.56.1, stable]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- id: rustfmt
name: Rust format
if: ${{ matrix.rust == 'stable' }}
run: |
cargo fmt --verbose --all -- --check
echo "passed_rustfmt=${{ matrix.rust }}" >> "$GITHUB_OUTPUT"
- id: clippy
name: Clippy
if: ${{ matrix.rust == '1.56.1' }}
run: |
cargo clippy --all --all-features --all-targets -- -D warnings
echo "passed_clippy=${{ matrix.rust }}" >> "$GITHUB_OUTPUT"
- id: test
name: Compile and run tests
run: cargo test --verbose
code-checks:
name: Code checks
runs-on: ubuntu-latest
needs: test
steps:
- name: Rustfmt
run: |
echo "Rustfmt run on ${{ needs.test.outputs.passed_rustfmt }}" >> "$GITHUB_STEP_SUMMARY"
test "${{ needs.test.outputs.passed_rustfmt }}" = "stable"
- name: Clippy
run: |
echo "Clippy run on ${{ needs.test.outputs.passed_clippy }}" >> "$GITHUB_STEP_SUMMARY"
test "${{ needs.test.outputs.passed_clippy }}" = "1.56.1"
cross-test:
name: Rust ${{ matrix.rust }}, target ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust: [1.65.0, stable]
target: [i686-unknown-linux-gnu, aarch64-unknown-linux-gnu]
env:
TRUC_CROSS: yes
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- run: |
curl -OL "https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-x86_64-unknown-linux-gnu.tar.gz"
mkdir cross
tar -C cross -xvzf cross-x86_64-unknown-linux-gnu.tar.gz
- run: |
mkdir -p "target/shared_machin/${{ matrix.target }}/debug"
./cross/cross run --target "${{ matrix.target }}" -p machin_target_types >| "target/shared_machin/${{ matrix.target }}/debug/target_types.json"
- run: ./cross/cross test --target ${{ matrix.target }} -vv