Windows fixes #32
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
# Based on https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md | |
# | |
# While our "example" application has the platform-specific code, | |
# for simplicity we are compiling and testing everything on the Ubuntu environment only. | |
# For multi-OS testing see the `cross.yml` workflow. | |
on: | |
push: {} | |
name: Compile and check all examples | |
# We specify the examples individually since they might need a different environment | |
jobs: | |
compile_examples: | |
strategy: | |
fail-fast: false | |
matrix: | |
example: ["capture", "convert-to-rgb", "threaded-capture"] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- uses: jwlawson/actions-setup-cmake@v2 | |
- uses: ilammy/setup-nasm@v1 | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install alsa-tools (ubuntu only) | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get install alsa-tools | |
- name: Set MSVC target (windows only) | |
if: matrix.os == 'windows-latest' | |
run: bash ./scripts/set-windows-msvc.sh | |
- name: Build example | |
working-directory: examples/${{ matrix.example }} | |
run: cargo build | |
- name: Clippy example | |
working-directory: examples/${{ matrix.example }} | |
run: cargo clippy | |