From cd95a0db0afb2bd5c5960c3f6b837d965cf48689 Mon Sep 17 00:00:00 2001 From: Summer Tea <79724236+acuteaangle@users.noreply.github.com> Date: Sat, 4 Jan 2025 02:13:19 -0500 Subject: [PATCH] ci: add github ci intergration to ensure PRs build successfully This adds GitHub Actions integration to automatically build (and run tests, should they be added in the future) on Windows, MacOS, and Linux. This will (hopefully) prevent issues like gh-87 (introduced by gh-83) from recurring in the future. Related-to: gh-83, gh-86, gh-87 --- .github/workflows/tests.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..5a511c4 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,33 @@ +name: Cargo Tests + +on: + - push + - pull_request + +env: + CARGO_TERM_COLOR: always + +jobs: + test: + name: Build and Test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - windows-latest + - macos-latest + - ubuntu-latest + toolchain: + - stable + - beta + - nightly + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Install ${{ matrix.toolchain}} Rust toolchain + run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - if: matrix.os == 'ubuntu-latest' + name: Install Linux build dependencies + run: sudo apt-get -yq install libgtk-3-dev libudev-dev + - name: Run cargo tests + run: cargo test --verbose