Skip to content

fix(ci)

fix(ci) #103

Workflow file for this run

name: test
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: test
strategy:
matrix:
build: [linux, linux-x11, macos, win-msvc]
include:
- build: linux
os: ubuntu-latest
rust: nightly
target: x86_64-unknown-linux-gnu
- build: linux-x11
os: ubuntu-latest
rust: nightly
target: x86_64-unknown-linux-gnu
- build: win-msvc
os: windows-latest
rust: nightly
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-test
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- name: Add mingw64 to path for x86_64-gnu
if: matrix.rust == 'nightly'
shell: bash
run: |
echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
- name: Test
shell: bash
run: |
export RUSTFLAGS="-Awarnings"
if [ "${{ matrix.build }}" = "linux-x11" ]; then
sudo apt update -y
sudo apt install -y libx11-dev libx11-xcb-dev
cargo build --release -F win_x11
elif [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
sudo apt update -y
sudo apt install -y curl gcc clang libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev libpipewire-0.3-dev libpango1.0-dev libwayland-egl1-mesa libwayland-client++0 libwayland-client-extra++0
cargo build -F win_wayland
else
cargo build
fi