tray-item merged my PR #39
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: Rust CI | |
on: | |
push: | |
paths-ignore: | |
- "clip-sync-ui/**" | |
branches: | |
- "**" | |
pull_request: | |
paths-ignore: | |
- "clip-sync-ui/**" | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
check_n_build_m: | |
name: Check and Build on macOS | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: rustfmt,clippy | |
- run: | | |
cargo fmt --check | |
cargo test | |
cargo clippy -- -D warnings | |
cargo build --verbose --release | |
rustup target add aarch64-apple-darwin | |
cargo build --verbose --release --target aarch64-apple-darwin | |
cargo build --verbose --release | |
lipo -create -output target/clip-sync target/release/clip-sync target/aarch64-apple-darwin/release/clip-sync | |
lipo -create -output target/clip-sync-cli target/release/clip-sync-cli target/aarch64-apple-darwin/release/clip-sync-cli | |
lipo -create -output target/clip-sync-server target/release/clip-sync-server target/aarch64-apple-darwin/release/clip-sync-server | |
- uses: actions/upload-artifact@v3 | |
with: | |
retention-days: 14 | |
name: clip-sync-universal-apple-darwin | |
path: target/clip-sync | |
- uses: actions/upload-artifact@v3 | |
with: | |
retention-days: 14 | |
name: clip-sync-cli-universal-apple-darwin | |
path: target/clip-sync-cli | |
- uses: actions/upload-artifact@v3 | |
with: | |
retention-days: 14 | |
name: clip-sync-server-universal-apple-darwin | |
path: target/clip-sync-server | |
check_n_build_w: | |
name: Check and Build on Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: rustfmt,clippy | |
- run: | | |
cargo fmt --check | |
cargo test | |
cargo clippy -- -D warnings | |
cargo build --verbose --release | |
- uses: actions/upload-artifact@v3 | |
with: | |
retention-days: 14 | |
name: clip-sync-x86_64-windows-msvc | |
path: target/release/clip-sync.exe | |
- uses: actions/upload-artifact@v3 | |
with: | |
retention-days: 14 | |
name: clip-sync-cli-x86_64-windows-msvc | |
path: target/release/clip-sync-cli.exe | |
- uses: actions/upload-artifact@v3 | |
with: | |
retention-days: 14 | |
name: clip-sync-server-x86_64-windows-msvc | |
path: target/release/clip-sync-server.exe | |
check_n_build_l: | |
name: Check and Build on Linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: rustfmt,clippy | |
- run: | | |
sudo apt-get -y update | |
sudo apt-get -y install musl-tools musl-dev perl libdbus-1-dev pkg-config libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev | |
rustup target add x86_64-unknown-linux-musl | |
cargo fmt --check | |
cargo clippy -- -D warnings | |
cargo test | |
cargo build --verbose --release --package clip-sync | |
cargo build --verbose --release --target x86_64-unknown-linux-musl --package clip-sync-server | |
cargo build --verbose --release --target x86_64-unknown-linux-musl --package clip-sync-cli | |
- uses: actions/upload-artifact@v3 | |
with: | |
retention-days: 14 | |
name: clip-sync-x86_64-linux-gnu | |
path: target/release/clip-sync | |
- uses: actions/upload-artifact@v3 | |
with: | |
retention-days: 14 | |
name: clip-sync-cli-x86_64-linux-musl | |
path: target/x86_64-unknown-linux-musl/release/clip-sync-cli | |
- uses: actions/upload-artifact@v3 | |
with: | |
retention-days: 14 | |
name: clip-sync-server-x86_64-linux-musl | |
path: target/x86_64-unknown-linux-musl/release/clip-sync-server |