chore: update CI
This commit is contained in:
parent
1f7f0c70b7
commit
586a16f17f
2 changed files with 35 additions and 58 deletions
28
.github/workflows/build.yml
vendored
28
.github/workflows/build.yml
vendored
|
|
@ -1,28 +0,0 @@
|
||||||
name: "Build"
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
jobs:
|
|
||||||
# build:
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v3
|
|
||||||
# - uses: cachix/install-nix-action@v22
|
|
||||||
# with:
|
|
||||||
# nix_path: nixpkgs=channel:nixpkgs-unstable
|
|
||||||
# - run: GIT_LFS_SKIP_SMUDGE=1 nix build
|
|
||||||
# - run: nix flake check
|
|
||||||
check-features:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- run: sudo apt-get update; sudo apt-get install -y libdrm-dev libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev libdisplay-info-dev
|
|
||||||
- run: cargo +stable check --no-default-features
|
|
||||||
- run: cargo +stable check --features debug
|
|
||||||
- run: cargo +stable check --features profile-with-tracy
|
|
||||||
- run: cargo +stable fmt --all -- --check
|
|
||||||
65
.github/workflows/ci.yml
vendored
65
.github/workflows/ci.yml
vendored
|
|
@ -2,76 +2,81 @@ name: Continuous Integration
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [master]
|
||||||
- master
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
format:
|
format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v5
|
||||||
- name: Rust toolchain
|
- name: Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
profile: minimal
|
|
||||||
components: rustfmt
|
components: rustfmt
|
||||||
default: true
|
|
||||||
- name: Cargo cache
|
- name: Cargo cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
~/.cargo/git
|
~/.cargo/git
|
||||||
key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
|
||||||
- name: Format
|
- name: Format
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo +stable fmt --all -- --check
|
||||||
|
|
||||||
|
check-features:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
- name: Rust toolchain
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
- name: Cargo cache
|
||||||
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
command: fmt
|
path: |
|
||||||
args: --all -- --check
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
|
||||||
|
- name: System dependencies
|
||||||
|
run: sudo apt-get update; sudo apt-get install libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev libdisplay-info-dev
|
||||||
|
- run: cargo +stable check --no-default-features
|
||||||
|
- run: cargo +stable check --features debug
|
||||||
|
- run: cargo +stable check --features profile-with-tracy
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout sources
|
- name: Checkout sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v5
|
||||||
- name: Rust toolchain
|
- name: Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
default: true
|
|
||||||
profile: minimal
|
|
||||||
- name: Cargo cache
|
- name: Cargo cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry
|
||||||
~/.cargo/git
|
~/.cargo/git
|
||||||
key: ${{ runner.os }}-cargo-rust_stable-${{ hashFiles('**/Cargo.toml') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
|
||||||
- name: System dependencies
|
- name: System dependencies
|
||||||
run: sudo apt-get update; sudo apt-get install libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libsystemd-dev libdbus-1-dev libdisplay-info-dev libpixman-1-dev
|
run: sudo apt-get update; sudo apt-get install libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libdisplay-info-dev libpixman-1-dev meson ninja-build
|
||||||
- name: Build cache
|
- name: Build cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: target
|
path: target
|
||||||
key: ${{ runner.os }}-build-rust_stable-smithay-feature_${{ matrix.features }}-${{ hashFiles('**/Cargo.toml') }}
|
key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.toml') }}
|
||||||
- name: Build and install Libseat
|
- name: Build and install Libseat
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install meson ninja-build
|
wget https://git.sr.ht/~kennylevinsen/seatd/archive/0.9.1.tar.gz -O libseat-source.tar.gz
|
||||||
wget https://git.sr.ht/~kennylevinsen/seatd/archive/0.5.0.tar.gz -O libseat-source.tar.gz
|
|
||||||
tar xf libseat-source.tar.gz
|
tar xf libseat-source.tar.gz
|
||||||
cd seatd-0.5.0
|
cd seatd-0.9.1
|
||||||
meson -Dbuiltin=enabled -Dserver=disabled -Dexamples=disabled -Dman-pages=disabled build .
|
meson setup -Dlibseat-builtin=enabled -Dserver=disabled -Dexamples=disabled -Dman-pages=disabled build .
|
||||||
ninja -C build
|
ninja -C build
|
||||||
sudo meson install -C build
|
sudo meson install -C build
|
||||||
sudo ldconfig
|
sudo ldconfig
|
||||||
- name: Test features
|
- name: Test features
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: full
|
RUST_BACKTRACE: full
|
||||||
with:
|
run: cargo test --all-features
|
||||||
command: test
|
|
||||||
args: --all-features
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue