mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 04:27:02 +01:00
use sccache, merge "test" actions into "build", remove homebrew caching (#1578)
* use sccache, merge "test" actions into "build", remove homebrew caching * rename some actions, make windows build in debug mode to be consistent with tests * run CI on Windows for pull requests, only upload to releases for the correct repo * Don't need rust on ubuntu-latest
This commit is contained in:
parent
49a767179c
commit
850a985692
19
.github/workflows/clippy.yml
vendored
19
.github/workflows/clippy.yml
vendored
|
@ -8,6 +8,9 @@ name: Clippy
|
|||
- master
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
@ -17,20 +20,12 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Restore our cache
|
||||
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') }}
|
||||
- name: Update package manager
|
||||
run: sudo apt-get update
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update && \
|
||||
sudo apt-get install -y \
|
||||
libpam0g-dev \
|
||||
libudev-dev \
|
||||
|
|
13
.github/workflows/debian_package_kanidm.yml
vendored
13
.github/workflows/debian_package_kanidm.yml
vendored
|
@ -5,6 +5,10 @@ name: "Build Debian Packages"
|
|||
push:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
@ -27,10 +31,9 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Update package manager
|
||||
run: apt-get update
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update && \
|
||||
apt-get install -y \
|
||||
lsb-release \
|
||||
libpam0g-dev \
|
||||
|
@ -43,7 +46,9 @@ jobs:
|
|||
sudo
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: "Doing the package build"
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.3
|
||||
- name: Build packages
|
||||
run: |
|
||||
make -f platform/debian/Makefile debs/all
|
||||
- name: Upload debs
|
||||
|
@ -56,7 +61,7 @@ jobs:
|
|||
name: Upload to releases
|
||||
needs: build-deb-package
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
if: github.ref == 'refs/heads/master' && github.repository == 'kanidm/kanidm'
|
||||
steps:
|
||||
- name: Download previously built debs
|
||||
uses: actions/download-artifact@v3
|
||||
|
|
28
.github/workflows/rust_build.yml
vendored
28
.github/workflows/rust_build.yml
vendored
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
name: "Rust Build"
|
||||
name: "Linux Build and Test"
|
||||
# Trigger the workflow on push to master or pull request
|
||||
"on":
|
||||
push:
|
||||
|
@ -7,6 +7,10 @@ name: "Rust Build"
|
|||
- master
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
@ -14,28 +18,20 @@ jobs:
|
|||
rust_build:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Restore our cache
|
||||
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') }}
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Update package manager
|
||||
run: sudo apt-get update
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update && \
|
||||
sudo apt-get install -y \
|
||||
libpam0g-dev \
|
||||
libudev-dev \
|
||||
libssl-dev \
|
||||
libsqlite3-dev
|
||||
|
||||
- name: Run build
|
||||
run: cargo build --verbose --workspace
|
||||
- run: cargo build --workspace
|
||||
- run: cargo test
|
||||
|
|
40
.github/workflows/rust_test.yml
vendored
40
.github/workflows/rust_test.yml
vendored
|
@ -1,40 +0,0 @@
|
|||
---
|
||||
name: "Rust Test"
|
||||
|
||||
# Trigger the workflow on push to master or pull request
|
||||
"on":
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
jobs:
|
||||
rust_test:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Restore our cache
|
||||
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') }}
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Update package manager
|
||||
run: sudo apt-get update
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get install -y \
|
||||
libpam0g-dev \
|
||||
libudev-dev \
|
||||
libssl-dev \
|
||||
libsqlite3-dev
|
||||
|
||||
- name: Run tests
|
||||
run: cargo test --release
|
14
.github/workflows/wasm_test.yml
vendored
14
.github/workflows/wasm_test.yml
vendored
|
@ -4,17 +4,18 @@ name: WASM Testing
|
|||
# Trigger the workflow on push or pull request
|
||||
"on": [push, pull_request]
|
||||
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
|
||||
jobs:
|
||||
wasm_test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Update package manager
|
||||
run: sudo apt-get update
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update &&
|
||||
sudo apt-get install -y \
|
||||
libpam0g-dev \
|
||||
libudev-dev \
|
||||
|
@ -23,6 +24,8 @@ jobs:
|
|||
pkg-config
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.3
|
||||
|
||||
- name: Install wasm-pack
|
||||
run: cargo install wasm-pack
|
||||
|
@ -40,6 +43,5 @@ jobs:
|
|||
|
||||
# docs here:
|
||||
# https://rustwasm.github.io/docs/wasm-bindgen/wasm-bindgen-test/browsers.html
|
||||
- name: "Run clippy (ignores errors, this is just a check)"
|
||||
run: wasm-pack test --headless --chrome
|
||||
- run: wasm-pack test --headless --chrome
|
||||
continue-on-error: true
|
||||
|
|
31
.github/workflows/windows_build.yml
vendored
31
.github/workflows/windows_build.yml
vendored
|
@ -6,33 +6,30 @@ name: Windows Build and Test
|
|||
# it builds and be able to administer Kanidm from
|
||||
# Windows-land
|
||||
|
||||
# Trigger the workflow on push to master or pull request
|
||||
"on":
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
SCCACHE_GHA_ENABLED: "true"
|
||||
RUSTC_WRAPPER: "sccache"
|
||||
|
||||
jobs:
|
||||
windows_build_kanidm:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: ensure openssl and vcpkg is good
|
||||
- name: Install OpenSSL
|
||||
run: |
|
||||
vcpkg integrate install
|
||||
vcpkg install openssl:x64-windows-static-md
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: build
|
||||
# yamllint disable-line rule:line-length
|
||||
run: cargo build --release -p kanidm_client -p kanidm_tools -p orca -p daemon
|
||||
windows_test_kanidm:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: ensure openssl and vcpkg is good
|
||||
run: |
|
||||
vcpkg integrate install
|
||||
vcpkg install openssl:x64-windows-static-md
|
||||
- name: Install Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
- name: Run cargo test
|
||||
# yamllint disable-line rule:line-length
|
||||
run: cargo test -p kanidm_client -p kanidm_tools -p orca -p daemon -p kanidmd_core
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@v0.0.3
|
||||
- run: cargo build -p kanidm_client -p kanidm_tools -p orca -p daemon
|
||||
# yamllint disable-line rule:line-length
|
||||
- run: cargo test -p kanidm_client -p kanidm_tools -p orca -p daemon -p kanidmd_core
|
||||
|
|
Loading…
Reference in a new issue