name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * *'
env:
CARGO_TERM_COLOR: always
jobs:
main:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
features: ["", "--features=load"]
rust: ["1.91", "stable", "beta", "nightly"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- run: "rustup component add clippy"
- uses: actions/checkout@v2
- run: "cargo build --verbose --no-default-features ${{ matrix.features }}"
- run: "cargo test --verbose --tests --no-default-features ${{ matrix.features }}"
- run: "cargo test --verbose --doc --no-default-features ${{ matrix.features }}"
- run: "cargo doc --verbose --no-default-features ${{ matrix.features }}"
- run: "cargo build --verbose --release --no-default-features ${{ matrix.features }}"
- run: "cargo clippy --verbose --no-default-features ${{ matrix.features }}"
ensure_no_std:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
triple: x86_64-unknown-linux-gnu
- os: windows-latest
triple: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- run: "rustup component add rust-src --toolchain nightly-${{ matrix.triple }}"
- uses: actions/checkout@v2
- run: "cargo +nightly build --verbose -Z build-std=core,panic_abort --target ${{ matrix.triple }} --release"
working-directory: ensure_no_std
- run: "./ensure_no_std/target/${{ matrix.triple }}/release/ensure_no_std"
example:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- run: "rustup component add clippy"
- run: "rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu"
- run: "sudo apt-get update && sudo apt-get install msitools wine"
- run: "sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get install wine32"
- run: "git clone --depth=1 https://github.com/est31/msvc-wine-rust.git"
working-directory: ".."
- run: "./get.sh licenses-accepted"
working-directory: "../msvc-wine-rust"
- run: "sed -i 's|\\./linker\\.sh|xvfb-run ./linker.sh|' linker-scripts/linkx64.sh"
working-directory: "../msvc-wine-rust"
- run: "sed -i 's|\\./linker\\.sh|xvfb-run ./linker.sh|' linker-scripts/linkx86.sh"
working-directory: "../msvc-wine-rust"
- run: "cp msobj140.dll mspdbcore.dll ../x86"
working-directory: "../msvc-wine-rust/extracted/tools/VC/Tools/MSVC/14.11.25503/bin/Hostx64/x64"
- run: "cp mspdb140.dll msobj140.dll mspdbcore.dll mspdbsrv.exe ../x64"
working-directory: "../msvc-wine-rust/extracted/tools/VC/Tools/MSVC/14.11.25503/bin/Hostx86/x86"
- run: "echo '[target.i386-pc-dos-msvc]' > $HOME/.cargo/config"
- run: "echo -n \"linker=\\\"$PWD/linker-scripts/linkx86.sh\\\"\" >> $HOME/.cargo/config"
working-directory: "../msvc-wine-rust"
- uses: actions/checkout@v2
- run: "make debug"
working-directory: examples/hello
- run: "make release"
working-directory: examples/hello
- run: "make clippy"
working-directory: examples/hello