Skip to content

Merge pull request #54 from worksoup/dev #134

Merge pull request #54 from worksoup/dev

Merge pull request #54 from worksoup/dev #134

Workflow file for this run

# Copyright (C) 2024 worksoup <https://github.com/worksoup/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
name: Rust
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Rust project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install Deps
run: sudo apt update && sudo apt-get install -yqq libdbus-1-dev libxcb1-dev
- name: Install latest nightly
uses: crusty-pie/toolchain@v1
with:
toolchain: nightly
override: true
components: clippy
- name: Run cargo check
uses: clechasseur/rs-cargo@v2
with:
command: check
- name: Run cargo clippy
uses: clechasseur/rs-cargo@v2
with:
command: clippy
build:
if: ${{ github.ref == 'refs/heads/main' }}
needs: [ check ]
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest }
- { os: windows-2022 }
- { os: macos-13 }
name: ${{ format('{0}', matrix.os) }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install Deps
if: ${{ matrix.os == 'ubuntu-latest' }}
run: sudo apt update && sudo apt-get install -yqq libdbus-1-dev libxcb1-dev
- name: Install latest nightly
uses: crusty-pie/toolchain@v1
with:
toolchain: nightly
override: true
- name: Run cargo build
uses: clechasseur/rs-cargo@v2
with:
command: build
args: --release --all-features
- name: Upload artifact
if: ${{ matrix.os != 'windows-2022' }}
uses: actions/upload-artifact@v4
with:
name: '${{ matrix.os }}'
path: '${{ github.workspace }}/target/release/*sign'
- name: Upload artifact (Windows)
if: ${{ matrix.os == 'windows-2022' }}
uses: actions/upload-artifact@v4
with:
name: '${{ matrix.os }}'
path: '${{ github.workspace }}/target/release/*sign.exe'