-
-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
65 additions
and
78 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,36 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: "-Dwarnings" | ||
|
||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: "-Dwarnings" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install dependencies | ||
run: sudo apt-get update && sudo apt-get install libgtk-3-dev libgtk-layer-shell-dev libdbusmenu-gtk3-dev | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy,rustfmt | ||
|
||
- name: Load rust cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Setup problem matchers | ||
uses: r7kamura/rust-problem-matchers@v1 | ||
|
||
- name: Check formatting | ||
run: cargo fmt -- --check | ||
|
||
- name: Run tests | ||
run: cargo test | ||
|
||
- name: Check with default features | ||
run: cargo clippy | ||
- name: Check x11 only | ||
run: cargo clippy --no-default-features --features=x11 | ||
- name: Check wayland only | ||
run: cargo clippy --no-default-features --features=wayland | ||
- name: Check no-backend | ||
run: cargo clippy --no-default-features | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install dependencies | ||
run: sudo apt-get update && sudo apt-get install libgtk-3-dev libgtk-layer-shell-dev libdbusmenu-gtk3-dev | ||
- uses: actions/checkout@v4 | ||
- name: Setup rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy,rustfmt | ||
- name: Load rust cache | ||
uses: Swatinem/rust-cache@v2 | ||
- name: Setup problem matchers | ||
uses: r7kamura/rust-problem-matchers@v1 | ||
- name: Check formatting | ||
run: cargo fmt -- --check | ||
- name: Run tests | ||
run: cargo test | ||
- name: Check with default features | ||
run: cargo clippy | ||
- name: Check x11 only | ||
run: cargo clippy --no-default-features --features=x11 | ||
- name: Check wayland only | ||
run: cargo clippy --no-default-features --features=wayland | ||
- name: Check no-backend | ||
run: cargo clippy --no-default-features |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,36 @@ | ||
name: Build and deploy Github pages | ||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "docs/**" | ||
- "gen-docs.ts" | ||
- "crates/eww/src/widgets/widget_definitions.rs" | ||
- "crates/eww/src/config/inbuilt.rs" | ||
- ".github/workflows/**" | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "docs/**" | ||
- "gen-docs.ts" | ||
- "crates/eww/src/widgets/widget_definitions.rs" | ||
- "crates/eww/src/config/inbuilt.rs" | ||
- ".github/workflows/**" | ||
jobs: | ||
build: | ||
name: Build mdBook | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'elkowar/eww' | ||
steps: | ||
# Checkout | ||
- uses: actions/checkout@master | ||
|
||
# Build widget documentation | ||
- name: Use deno to build widget documentation | ||
uses: denoland/setup-deno@main | ||
with: | ||
deno-version: "v1.x" | ||
- run: deno run --allow-read --allow-write gen-docs.ts ./crates/eww/src/widgets/widget_definitions.rs ./crates/eww/src/config/inbuilt.rs | ||
|
||
# Build & deploy | ||
- name: build mdBook page | ||
uses: peaceiris/actions-mdbook@v1 | ||
with: | ||
mdbook-version: '0.4.8' | ||
- run: mdbook build docs | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/book/ | ||
build: | ||
name: Build mdBook | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'elkowar/eww' | ||
steps: | ||
# Checkout | ||
- uses: actions/checkout@master | ||
# Build widget documentation | ||
- name: Use deno to build widget documentation | ||
uses: denoland/setup-deno@main | ||
with: | ||
deno-version: "v1.x" | ||
- run: deno run --allow-read --allow-write gen-docs.ts ./crates/eww/src/widgets/widget_definitions.rs ./crates/eww/src/config/inbuilt.rs | ||
# Build & deploy | ||
- name: build mdBook page | ||
uses: peaceiris/actions-mdbook@v1 | ||
with: | ||
mdbook-version: '0.4.8' | ||
- run: mdbook build docs | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs/book/ |