|
| 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 | + --skip copying_files_multiple_times_to_same_location" |
| 19 | + |
| 20 | + |
| 21 | +jobs: |
| 22 | + build: |
| 23 | + runs-on: ${{ matrix.os }} |
| 24 | + continue-on-error: true |
| 25 | + strategy: |
| 26 | + matrix: |
| 27 | + name: [Linux, Windows, macOS] |
| 28 | + include: |
| 29 | + - name: Linux |
| 30 | + os: ubuntu-latest |
| 31 | + target: x86_64-unknown-linux-gnu |
| 32 | + dependencies: sudo apt update && sudo apt -y install libglvnd-dev libwayland-dev libxkbcommon-dev libinput-dev libssl-dev libflatpak-dev |
| 33 | + - name: Windows |
| 34 | + os: windows-latest |
| 35 | + target: x86_64-pc-windows-msvc |
| 36 | + dependencies: "" |
| 37 | + - name: macOS |
| 38 | + os: macos-latest |
| 39 | + target: x86_64-apple-darwin |
| 40 | + dependencies: brew install libxkbcommon wayland |
| 41 | + |
| 42 | + |
| 43 | + steps: |
| 44 | + - name: Checkout repository |
| 45 | + uses: actions/checkout@v4 |
| 46 | + |
| 47 | + - name: Add Rust |
| 48 | + uses: actions-rust-lang/setup-rust-toolchain@v1 |
| 49 | + with: |
| 50 | + toolchain: stable |
| 51 | + target: ${{ matrix.target }} |
| 52 | + |
| 53 | + - name: Dependencies |
| 54 | + run: ${{ matrix.dependencies }} |
| 55 | + |
| 56 | + - name: Build ${{ matrix.name }} |
| 57 | + run: cargo build --target ${{ matrix.target }} --verbose --locked |
| 58 | + - run: cargo test --target ${{ matrix.target }} --verbose -- ${{ env.SKIP_TESTS }} |
| 59 | + |
0 commit comments