-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
- Loading branch information
Showing
13 changed files
with
579 additions
and
54 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 |
---|---|---|
@@ -0,0 +1,213 @@ | ||
--- | ||
name: Python CI | ||
|
||
"on": | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
|
||
jobs: | ||
lint: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
job: | ||
- black | ||
- mypy | ||
- ruff | ||
runs-on: ubuntu-latest | ||
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=dev | ||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: just | ||
- name: Lint | ||
run: poetry run just ci-lint-${{ matrix.job }} | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
- "3.13" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- 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: ${{ matrix.python-version }} | ||
cache: "poetry" | ||
- name: Install Python dependencies | ||
run: poetry install --only=dev | ||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: just | ||
- name: Build | ||
run: poetry run just ci-build-python | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-${{ matrix.python-version }}-build | ||
path: dist | ||
test: | ||
needs: build | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
job: | ||
- mit | ||
# Several issues in k5test preventing us from running kadmind with it currently | ||
# - h5l | ||
python-version: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
- "3.13" | ||
runs-on: ubuntu-latest | ||
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: ${{ matrix.python-version }} | ||
cache: "poetry" | ||
- name: Install Python dependencies | ||
run: poetry install --only=test | ||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: just | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: python-${{ matrix.python-version }}-build | ||
path: dist | ||
- name: Test | ||
run: | | ||
PATH="/usr/lib/heimdal-servers:$PATḦ" poetry run just ci-test-python-${{ matrix.job }} | ||
check: | ||
if: always() | ||
needs: | ||
- lint | ||
- build | ||
- test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: re-actors/alls-green@release/v1 | ||
with: | ||
jobs: ${{ toJSON(needs) }} | ||
build-wheels: | ||
# needs: | ||
# - check | ||
# - build | ||
# - test | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- macos-13 # Intel | ||
- macos-14 # Apple silicon | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: docker/setup-qemu-action@v3 | ||
if: runner.os == 'Linux' | ||
with: | ||
platforms: all | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x | ||
CIBW_BEFORE_ALL_LINUX: "curl -sSf https://sh.rustup.rs | sh -s -- -y && yum install -y krb5-devel clang-devel" | ||
CIBW_BEFORE_ALL_MACOS: "curl -sSf https://sh.rustup.rs | sh -s -- -y && brew install llvm krb5" | ||
CIBW_ENVIRONMENT_LINUX: "PATH=$HOME/.cargo/bin:$PATH" | ||
CIBW_ENVIRONMENT_MACOS: PKG_CONFIG_PATH=/opt/homebrew/opt/krb5/lib/pkgconfig:/usr/local/opt/krb5/lib/pkgconfig MACOSX_DEPLOYMENT_TARGET=14.0 | ||
CIBW_SKIP: "*-musllinux_i686 *-manylinux_i686" | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | ||
CIBW_MANYLINUX_PYPY_X86_64_IMAGE: manylinux_2_28 | ||
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28 | ||
CIBW_MANYLINUX_PPC64LE_IMAGE: manylinux_2_28 | ||
CIBW_MANYLINUX_S390X_IMAGE: manylinux_2_28 | ||
CIBW_MANYLINUX_PYPY_AARCH64_IMAGE: manylinux_2_28 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-cibw-wheels-${{ matrix.os }} | ||
path: ./wheelhouse/*.whl | ||
build-sdist: | ||
runs-on: ubuntu-latest | ||
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: ${{ matrix.python-version }} | ||
cache: "poetry" | ||
- name: Install Python dependencies | ||
run: poetry install --only=dev | ||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: just | ||
- name: Build | ||
run: poetry run just ci-build-python-sdist | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-cibw-sdist | ||
path: dist/*.tar.gz | ||
release: | ||
needs: | ||
- build-wheels | ||
- build-sdist | ||
runs-on: ubuntu-latest | ||
environment: pypi | ||
permissions: | ||
id-token: write | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/python-kadmin-rs/version/') | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
pattern: python-cibw-* | ||
path: dist | ||
merge-multiple: true | ||
- uses: pypa/gh-action-pypi-publish@release/v1 |
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 |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
name: Rust CI | ||
|
||
"on": | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
|
||
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 }} | ||
name: Setup rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
components: ${{ matrix.components }} | ||
- if: ${{ ! matrix.toolchain }} | ||
name: Setup rust | ||
uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- uses: taiki-e/install-action@v2 | ||
with: | ||
tool: just | ||
- 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: taiki-e/install-action@v2 | ||
with: | ||
tool: just | ||
- name: Build | ||
run: just ci-build-rust | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
job: | ||
- rust | ||
- sanity | ||
runs-on: ubuntu-latest | ||
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: taiki-e/install-action@v2 | ||
with: | ||
tool: just | ||
- name: Test | ||
run: poetry run just ci-test-${{ matrix.job }} |
Oops, something went wrong.