Skip to content

Commit 7936826

Browse files
Rudimentary continuous integration
1 parent 3245f76 commit 7936826

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/main.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Check COSMIC Files
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
# FIXME: This disables -D warnings because the build fails with it
12+
RUSTFLAGS: ""
13+
SKIP_TESTS: "--skip copy_dir_to_same_location \
14+
--skip copy_file_to_same_location \
15+
--skip copy_file_with_extension_to_same_loc \
16+
--skip copy_file_with_diff_name_to_diff_dir \
17+
--skip copy_to_diff_dir_doesnt_dupe_files"
18+
19+
20+
jobs:
21+
build:
22+
runs-on: ${{ matrix.os }}
23+
continue-on-error: true
24+
strategy:
25+
matrix:
26+
name: [Linux, Windows, macOS]
27+
include:
28+
- name: Linux
29+
os: ubuntu-latest
30+
target: x86_64-unknown-linux-gnu
31+
dependencies: sudo apt update && sudo apt -y install libglvnd-dev libwayland-dev libxkbcommon-dev libinput-dev libssl-dev libflatpak-dev
32+
- name: Windows
33+
os: windows-latest
34+
target: x86_64-pc-windows-msvc
35+
dependencies: ""
36+
- name: macOS
37+
os: macos-latest
38+
target: x86_64-apple-darwin
39+
dependencies: brew install libxkbcommon wayland
40+
41+
42+
steps:
43+
- name: Checkout repository
44+
uses: actions/checkout@v4
45+
46+
- name: Add Rust
47+
uses: actions-rust-lang/setup-rust-toolchain@v1
48+
49+
- name: Update ${{ matrix.name }}
50+
run: |
51+
rustup target add ${{ matrix.target }}
52+
rustup update stable
53+
rustup default stable
54+
55+
- name: Dependencies
56+
run: ${{ matrix.dependencies }}
57+
58+
- name: Build ${{ matrix.name }}
59+
run: cargo build --target ${{ matrix.target }} --verbose --locked
60+
- run: cargo test --target ${{ matrix.target }} --verbose -- ${{ env.SKIP_TESTS }}
61+

0 commit comments

Comments
 (0)