Skip to content

Rudimentary continuous integration #942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Check COSMIC Files

on:
push:
branches: [master]
pull_request:
branches: [master]

env:
CARGO_TERM_COLOR: always
# FIXME: This disables -D warnings because the build fails with it
RUSTFLAGS: ""
SKIP_TESTS: "--skip copy_dir_to_same_location \
--skip copy_file_to_same_location \
--skip copy_file_with_extension_to_same_loc \
--skip copy_file_with_diff_name_to_diff_dir \
--skip copy_to_diff_dir_doesnt_dupe_files \
--skip copying_files_multiple_times_to_same_location"


jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
matrix:
name: [Linux, Windows, macOS]
include:
- name: Linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
dependencies: sudo apt update && sudo apt -y install libglvnd-dev libwayland-dev libxkbcommon-dev libinput-dev libssl-dev libflatpak-dev
- name: Windows
os: windows-latest
target: x86_64-pc-windows-msvc
dependencies: ""
- name: macOS
os: macos-latest
target: x86_64-apple-darwin
dependencies: brew install libxkbcommon wayland


steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Add Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}

- name: Dependencies
run: ${{ matrix.dependencies }}

- name: Build ${{ matrix.name }}
run: cargo build --target ${{ matrix.target }} --verbose --locked
- run: cargo test --target ${{ matrix.target }} --verbose -- ${{ env.SKIP_TESTS }}