fix: notifications on linux #12
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: Build | |
on: | |
push: | |
paths: | |
- '.github/workflows/build.yml' | |
- 'Cargo.lock' | |
- 'Cargo.toml' | |
- 'src/**' | |
- 'ext/**' | |
- 'build.rs' | |
pull_request: | |
paths: | |
- '.github/workflows/build.yml' | |
- 'Cargo.lock' | |
- 'Cargo.toml' | |
- 'src/**' | |
- 'ext/**' | |
- 'build.rs' | |
env: | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
build: | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [windows-latest, ubuntu-20.04, macos-latest] | |
steps: | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
# Download a prebuilt webui static lib based on OS, and rename to libwebui-2-static.a | |
- name: Download WebUI | |
if: matrix.platform == 'ubuntu-20.04' | |
run: | | |
curl -L https://github.com/SpikeHD/webui/releases/download/v0.0.0/libwebui-2-static_linux.a -o libwebui-2-static.a | |
- name: Download WebUI | |
if: matrix.platform == 'windows-latest' | |
run: | | |
curl -L https://github.com/SpikeHD/webui/releases/download/v0.0.0/webui-2-static.lib -o webui-2-static.lib | |
- name: Download WebUI | |
if: matrix.platform == 'macos-latest' | |
run: | | |
curl -L https://github.com/SpikeHD/webui/releases/download/v0.0.0/libwebui-2-static_macos.a -o libwebui-2-static.a | |
- name: Build | |
run: cargo build --release | |
env: | |
RUSTFLAGS: -Awarnings | |
# Move the binary to the root of the project | |
- name: Move Binary | |
run: mv target/release/flooed* . | |
# Zip up the binary as well as the ext/ folder | |
- name: Compress | |
if: matrix.platform != 'windows-latest' | |
run: | | |
zip -r release.zip ext flooed | |
- name: Compress | |
if: matrix.platform == 'windows-latest' | |
run: | | |
7z a -tzip release.zip ext flooed.exe | |
- name: Upload Release | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ./release.zip | |
name: release-${{ runner.os }}.zip |