Merge pull request #264 from RainbowCookie32/dependabot/cargo/quick-x… #775
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: rusty-psn Builds | |
on: | |
- push | |
- pull_request | |
jobs: | |
build_matrix: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
feature: ["cli", "egui"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Rust Cache | |
uses: Swatinem/[email protected] | |
with: | |
key: ${{ matrix.feature }}-${{ matrix.os }} | |
cache-on-failure: "true" | |
- name: Install dependencies | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.feature == 'egui' }} | |
run: | | |
sudo apt update | |
sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev libgtk-3-dev | |
- name: Build rusty-psn | |
run: cargo build --release --no-default-features --features ${{ matrix.feature }} | |
- name: Move binary (Linux) | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
mkdir result | |
cp target/release/rusty-psn result | |
- name: Move binary (MacOS) | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: | | |
mkdir result | |
cp target/release/rusty-psn result | |
- name: Move binary (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
mkdir result | |
cp target/release/rusty-psn.exe result | |
- name: Upload artifact (Linux) | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rusty-psn-${{ matrix.feature }}-linux | |
path: result | |
- name: Upload artifact (MacOS) | |
if: ${{ matrix.os == 'macos-latest' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rusty-psn-${{ matrix.feature }}-macos | |
path: result | |
- name: Upload artifact (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rusty-psn-${{ matrix.feature }}-windows | |
path: result | |