From 42dd8ee0a9129b1f12a9aa06a349058a2a591b6d Mon Sep 17 00:00:00 2001 From: James Hodgkinson Date: Sat, 6 May 2023 18:20:47 +1000 Subject: [PATCH] more testing cleanup (#1595) * more testing cleanup * path fixings for main deploy phase of the book, refers to #1597 --- .github/workflows/debian_package_kanidm.yml | 2 +- .github/workflows/docker_build_kanidm.yml | 4 +-- .github/workflows/docker_build_kanidmd.yml | 4 +-- .github/workflows/docker_build_radiusd.yml | 4 +-- .github/workflows/kanidm_book.yml | 2 +- .github/workflows/kanidm_individual_book.yml | 16 ++++------- .github/workflows/rust_build.yml | 2 +- .github/workflows/wasm_test.yml | 4 --- Cargo.lock | 30 ++++++++++---------- 9 files changed, 30 insertions(+), 38 deletions(-) diff --git a/.github/workflows/debian_package_kanidm.yml b/.github/workflows/debian_package_kanidm.yml index 5d848f428..7d8e280bf 100644 --- a/.github/workflows/debian_package_kanidm.yml +++ b/.github/workflows/debian_package_kanidm.yml @@ -63,7 +63,7 @@ jobs: name: Upload to releases needs: build-deb-package runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' && github.repository == 'kanidm/kanidm' + if: ${{ github.ref == 'refs/heads/master' && github.repository == 'kanidm/kanidm' }} steps: - name: Download previously built debs uses: actions/download-artifact@v3 diff --git a/.github/workflows/docker_build_kanidm.yml b/.github/workflows/docker_build_kanidm.yml index 024660d40..b0a1240e3 100644 --- a/.github/workflows/docker_build_kanidm.yml +++ b/.github/workflows/docker_build_kanidm.yml @@ -31,12 +31,12 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} # don't log in if we're not going to push! - if: ${{ github.ref == 'refs/heads/master' }} + if: ${{ github.ref == 'refs/heads/master' }} && ${{ github.repository == 'kanidm/kanidm' }} - name: Build and push kanidmd id: docker_build_kanidm uses: docker/build-push-action@v4 with: - push: ${{ github.ref == 'refs/heads/master' }} + push: ${{ github.ref == 'refs/heads/master' && github.repository == 'kanidm/kanidm' }} platforms: "linux/amd64" # https://github.com/docker/build-push-action/issues/254 tags: ghcr.io/kanidm/kanidm:devel diff --git a/.github/workflows/docker_build_kanidmd.yml b/.github/workflows/docker_build_kanidmd.yml index d3ff36bad..0f3f824d9 100644 --- a/.github/workflows/docker_build_kanidmd.yml +++ b/.github/workflows/docker_build_kanidmd.yml @@ -32,12 +32,12 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} # don't log in if we're not going to push! - if: ${{ github.ref == 'refs/heads/master' }} + if: ${{ github.ref == 'refs/heads/master' }} && ${{ github.repository == 'kanidm/kanidm' }} - name: Build and push kanidmd id: docker_build_kanidmd uses: docker/build-push-action@v4 with: - push: ${{ github.ref == 'refs/heads/master' }} + push: ${{ github.ref == 'refs/heads/master' && github.repository == 'kanidm/kanidm' }} platforms: linux/amd64 tags: ghcr.io/kanidm/kanidmd:devel # build-args: | diff --git a/.github/workflows/docker_build_radiusd.yml b/.github/workflows/docker_build_radiusd.yml index cdef58fb1..31bb579ff 100644 --- a/.github/workflows/docker_build_radiusd.yml +++ b/.github/workflows/docker_build_radiusd.yml @@ -31,12 +31,12 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} # don't log in if we're not going to push! - if: ${{ github.ref == 'refs/heads/master' }} + if: ${{github.ref == 'refs/heads/master'}} && ${{ github.repository == 'kanidm/kanidm' }} - name: Build and push radius id: docker_build_radius uses: docker/build-push-action@v4 with: - push: ${{ github.ref == 'refs/heads/master' }} + push: ${{ github.ref == 'refs/heads/master' && github.repository == 'kanidm/kanidm' }} platforms: linux/arm64,linux/amd64 # https://github.com/docker/build-push-action/issues/254 tags: ghcr.io/kanidm/radius:devel diff --git a/.github/workflows/kanidm_book.yml b/.github/workflows/kanidm_book.yml index 39ca2d127..97349937e 100644 --- a/.github/workflows/kanidm_book.yml +++ b/.github/workflows/kanidm_book.yml @@ -77,4 +77,4 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs - destination_dir: ./docs + destination_dir: ./ diff --git a/.github/workflows/kanidm_individual_book.yml b/.github/workflows/kanidm_individual_book.yml index 9c2648bde..4e500c1e0 100644 --- a/.github/workflows/kanidm_individual_book.yml +++ b/.github/workflows/kanidm_individual_book.yml @@ -11,6 +11,9 @@ name: "Github Pages - Branch" parent_id: required: true type: string +env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" jobs: generate_mdbook: @@ -20,16 +23,10 @@ jobs: - uses: actions/checkout@v3 with: ref: ${{ inputs.tag }} - - name: Restore our cache - uses: actions/cache@v3 + - name: Setup sccache + uses: mozilla-actions/sccache-action@v0.0.3 with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + version: "v0.4.2" - name: Install deps run: | sudo apt-get update @@ -37,7 +34,6 @@ jobs: librust-openssl-dev libssl-dev \ libsqlite3-dev libudev-dev \ libpam0g-dev - - name: Setup mdBook uses: peaceiris/actions-mdbook@v1 with: diff --git a/.github/workflows/rust_build.yml b/.github/workflows/rust_build.yml index d299612da..4069c6e7b 100644 --- a/.github/workflows/rust_build.yml +++ b/.github/workflows/rust_build.yml @@ -16,7 +16,7 @@ concurrency: cancel-in-progress: true jobs: rust_build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install Rust diff --git a/.github/workflows/wasm_test.yml b/.github/workflows/wasm_test.yml index 4fb566003..66edbab4f 100644 --- a/.github/workflows/wasm_test.yml +++ b/.github/workflows/wasm_test.yml @@ -22,16 +22,12 @@ jobs: libssl-dev \ libsqlite3-dev \ pkg-config - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - name: Setup sccache uses: mozilla-actions/sccache-action@v0.0.3 with: version: "v0.4.2" - - name: Install wasm-pack run: cargo install wasm-pack - # https://github.com/browser-actions/setup-chrome - name: Install Chrome Headless uses: browser-actions/setup-chrome@latest diff --git a/Cargo.lock b/Cargo.lock index 91d53f3c8..45211633b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1147,7 +1147,7 @@ dependencies = [ [[package]] name = "daemon" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "clap", "clap_complete", @@ -2258,7 +2258,7 @@ dependencies = [ [[package]] name = "kanidm-ipa-sync" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "base64urlsafedata", "chrono", @@ -2282,7 +2282,7 @@ dependencies = [ [[package]] name = "kanidm_client" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "kanidm_proto", "reqwest", @@ -2323,7 +2323,7 @@ dependencies = [ [[package]] name = "kanidm_proto" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "base32", "base64urlsafedata", @@ -2342,7 +2342,7 @@ dependencies = [ [[package]] name = "kanidm_tools" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "clap", "clap_complete", @@ -2369,7 +2369,7 @@ dependencies = [ [[package]] name = "kanidm_unix_int" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "bytes", "clap", @@ -2402,7 +2402,7 @@ dependencies = [ [[package]] name = "kanidmd_core" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "async-trait", "chrono", @@ -2435,7 +2435,7 @@ dependencies = [ [[package]] name = "kanidmd_lib" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "async-trait", "base64 0.21.0", @@ -2503,7 +2503,7 @@ dependencies = [ [[package]] name = "kanidmd_testkit" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "compact_jwt", "futures", @@ -2526,7 +2526,7 @@ dependencies = [ [[package]] name = "kanidmd_web_ui" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "compact_jwt", "gloo", @@ -2879,7 +2879,7 @@ dependencies = [ [[package]] name = "nss_kanidm" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "kanidm_unix_int", "lazy_static", @@ -3079,7 +3079,7 @@ dependencies = [ [[package]] name = "orca" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "clap", "crossbeam", @@ -3119,7 +3119,7 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pam_kanidm" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "kanidm_unix_int", "libc", @@ -3390,7 +3390,7 @@ dependencies = [ [[package]] name = "profiles" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "base64 0.21.0", "serde", @@ -4095,7 +4095,7 @@ dependencies = [ [[package]] name = "sketching" -version = "1.1.0-alpha.12" +version = "1.1.0-beta.13" dependencies = [ "async-trait", "num_enum",