[go: up one dir, main page]

linkme 0.3.3

Safe cross-platform linker shenanigans
Documentation
name: CI

on:
  push:
  pull_request:
  schedule: [cron: "40 1 * * *"]

env:
  RUSTFLAGS: -Dwarnings

jobs:
  test:
    name: ${{matrix.name || format('Rust {0}', matrix.rust)}}
    runs-on: ${{matrix.os}}-latest
    strategy:
      fail-fast: false
      matrix:
        rust: [nightly, beta, stable, 1.62.0]
        os: [ubuntu]
        include:
          - name: macOS
            os: macos
            rust: nightly
          - name: Windows (gnu)
            os: windows
            rust: nightly-x86_64-pc-windows-gnu
          - name: Windows (msvc)
            os: windows
            rust: nightly-x86_64-pc-windows-msvc
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{matrix.rust}}
      - run: cargo check --manifest-path tests/crate/Cargo.toml
      - run: cargo test
        # windows-gnu: https://github.com/dtolnay/linkme/issues/25
        continue-on-error: ${{matrix.rust == 'nightly-x86_64-pc-windows-gnu'}}
      - run: cargo test --release
        continue-on-error: ${{matrix.rust == 'nightly-x86_64-pc-windows-gnu'}}

  cortex:
    name: Cortex-M
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@nightly
        with:
          target: thumbv7m-none-eabi
      - name: Install QEMU
        run: |
          sudo apt-get update
          sudo apt-get install -y qemu-system-arm
      - run: cargo run --release
        working-directory: tests/cortex
        # https://github.com/dtolnay/linkme/issues/40
        continue-on-error: true

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    if: github.event_name != 'pull_request'
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@clippy
      - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic

  outdated:
    name: Outdated
    runs-on: ubuntu-latest
    if: github.event_name != 'pull_request'
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/install@cargo-outdated
      - run: cargo outdated --workspace --exit-code 1