Add desktop platform support #11
1 changed files with 87 additions and 17 deletions
|
|
@ -6,7 +6,14 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
fmt:
|
||||||
|
runs-on: rust-ci
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Format check
|
||||||
|
run: cargo fmt --check
|
||||||
|
|
||||||
|
clippy-native:
|
||||||
runs-on: rust-ci
|
runs-on: rust-ci
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
@ -33,36 +40,99 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
sccache-${{ runner.os }}-
|
sccache-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Add wasm target
|
|
||||||
run: rustup target add wasm32-unknown-unknown
|
|
||||||
|
|
||||||
- name: Format check
|
|
||||||
run: cargo fmt --check
|
|
||||||
|
|
||||||
- name: Clippy (native crates)
|
- name: Clippy (native crates)
|
||||||
run: cargo clippy --workspace --exclude feedsignal-web --all-targets -- -D warnings
|
run: cargo clippy --workspace --exclude feedsignal-web --all-targets -- -D warnings
|
||||||
|
|
||||||
|
clippy-server:
|
||||||
|
runs-on: rust-ci
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Cache cargo registry and build artifacts
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
target
|
||||||
|
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
cargo-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Cache sccache compilation objects
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: /root/.cache/sccache
|
||||||
|
key: sccache-${{ runner.os }}-${{ github.run_id }}
|
||||||
|
restore-keys: |
|
||||||
|
sccache-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Clippy (web crate, server)
|
- name: Clippy (web crate, server)
|
||||||
run: cargo clippy -p feedsignal-web --no-default-features --features server --all-targets -- -D warnings
|
run: cargo clippy -p feedsignal-web --no-default-features --features server --all-targets -- -D warnings
|
||||||
|
|
||||||
|
clippy-web:
|
||||||
|
runs-on: rust-ci
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Cache cargo registry and build artifacts
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
target
|
||||||
|
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
cargo-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Cache sccache compilation objects
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: /root/.cache/sccache
|
||||||
|
key: sccache-${{ runner.os }}-${{ github.run_id }}
|
||||||
|
restore-keys: |
|
||||||
|
sccache-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Add wasm target
|
||||||
|
run: rustup target add wasm32-unknown-unknown
|
||||||
|
|
||||||
- name: Clippy (web crate, wasm client)
|
- name: Clippy (web crate, wasm client)
|
||||||
run: cargo clippy -p feedsignal-web --no-default-features --features web --target wasm32-unknown-unknown -- -D warnings
|
run: cargo clippy -p feedsignal-web --no-default-features --features web --target wasm32-unknown-unknown -- -D warnings
|
||||||
|
|
||||||
|
clippy-desktop:
|
||||||
# dioxus-desktop (tao/wry) needs GTK/WebKit headers to compile against
|
# dioxus-desktop (tao/wry) needs GTK/WebKit headers to compile against
|
||||||
# on Linux; not baked into the rust-ci image since no other job needs
|
# on Linux; rust-ci-desktop is rust-ci plus those, kept as a separate
|
||||||
# them.
|
# image so the other jobs above don't pull a much bigger one for
|
||||||
- name: Install desktop build dependencies
|
# headers only this job needs.
|
||||||
run: |
|
runs-on: rust-ci-desktop
|
||||||
apt-get update
|
steps:
|
||||||
apt-get install -y --no-install-recommends \
|
- uses: actions/checkout@v4
|
||||||
libgtk-3-dev libwebkit2gtk-4.1-dev libsoup-3.0-dev \
|
|
||||||
libayatana-appindicator3-dev librsvg2-dev libxdo-dev
|
- name: Cache cargo registry and build artifacts
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
target
|
||||||
|
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
cargo-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Cache sccache compilation objects
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: /root/.cache/sccache
|
||||||
|
key: sccache-${{ runner.os }}-${{ github.run_id }}
|
||||||
|
restore-keys: |
|
||||||
|
sccache-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Clippy (web crate, desktop)
|
- name: Clippy (web crate, desktop)
|
||||||
run: cargo clippy -p feedsignal-web --no-default-features --features desktop --all-targets -- -D warnings
|
run: cargo clippy -p feedsignal-web --no-default-features --features desktop --all-targets -- -D warnings
|
||||||
|
|
||||||
test:
|
test:
|
||||||
needs: check
|
needs: [fmt, clippy-native, clippy-server, clippy-web, clippy-desktop]
|
||||||
runs-on: rust-ci
|
runs-on: rust-ci
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue