Skip to content

kadmin: add key data support #342

kadmin: add key data support

kadmin: add key data support #342

Workflow file for this run

---
name: Rust CI
"on":
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- released
env:
DEBIAN_FRONTEND: noninteractive
CARGO_INCREMENTAL: "false"
SCCACHE_GHA_ENABLED: "on"
jobs:
lint:
strategy:
fail-fast: false
matrix:
job:
- clippy
include:
- job: rustfmt
toolchain: nightly
components: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- if: ${{ matrix.toolchain }}
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
components: ${{ matrix.components }}
- if: ${{ ! matrix.toolchain }}
uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- uses: taiki-e/install-action@v2
with:
tool: just,sccache
- name: Lint
run: just ci-lint-${{ matrix.job }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- uses: taiki-e/install-action@v2
with:
tool: just,sccache
- name: Build
run: just ci-build-rust
test:
strategy:
fail-fast: false
matrix:
job:
- rust
- sanity
runs-on: ubuntu-latest
timeout-minutes: 30
env:
KRB5_TRACE: /dev/stderr
steps:
- uses: actions/checkout@v4
- name: Install poetry & deps
shell: bash
run: |
pipx install poetry || true
- name: Setup python and restore poetry
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
cache: "poetry"
- name: Install Python dependencies
run: poetry install --only=test
- name: Setup rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- uses: taiki-e/install-action@v2
with:
tool: just,sccache
- name: Test
run: poetry run just ci-test-${{ matrix.job }}
check-rust:
if: always()
needs:
- lint
- build
- test
runs-on: ubuntu-latest
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
release:
needs:
- check-rust
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- crate: kadmin-sys
extra_args: "--no-verify"
- crate: kadmin
extra_args: ""
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
steps:
- if: startsWith(github.ref, format('refs/tags/{0}/version/', matrix.crate))
uses: actions/checkout@v4
with:
fetch-depth: 0
- if: startsWith(github.ref, format('refs/tags/{0}/version/', matrix.crate))
name: Setup rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- if: startsWith(github.ref, format('refs/tags/{0}/version/', matrix.crate))
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- if: startsWith(github.ref, format('refs/tags/{0}/version/', matrix.crate))
uses: taiki-e/install-action@v2
with:
tool: just,sccache
- if: startsWith(github.ref, format('refs/tags/{0}/version/', matrix.crate))
run: just ci-build-deps
- if: startsWith(github.ref, format('refs/tags/{0}/version/', matrix.crate))
run: cargo publish --package ${{ matrix.crate }} ${{ matrix.extra_args }}