chore(flake/flake-utils): c1dfcf08
-> 11707dc2
#4710
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
nix: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
python-version: | |
- "39" | |
- "310" | |
- "311" | |
- "312" | |
include: | |
- os: macos-latest | |
python-version: "39" | |
- os: macos-latest | |
python-version: "312" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable-small | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: numbsql | |
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }} | |
extraPullNames: nix-community,poetry2nix | |
- name: build and test | |
run: nix build --no-link --keep-going '.#numbsql${{ matrix.python-version }}' | |
- name: show closure size | |
run: | | |
set -euo pipefail | |
nix path-info -Shr '.#numbsql${{ matrix.python-version }}' | sort -h -k2 | |
conda: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
spec: | |
- deps: | |
python-version: "3.9" | |
numba: "0.53" | |
llvmlite: "0.36" | |
- env: | |
NUMBA_CAPTURED_ERRORS: new_style | |
deps: | |
python-version: "3.10" | |
- env: | |
NUMBA_CAPTURED_ERRORS: new_style | |
deps: | |
python-version: "3.11" | |
- env: | |
NUMBA_CAPTURED_ERRORS: new_style | |
deps: | |
python-version: "3.12" | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
id: install_python | |
with: | |
python-version: ${{ matrix.spec.deps.python-version }} | |
- run: pip3 install poetry2conda poetry | |
- run: poetry add --lock "numba@${{ matrix.spec.deps.numba }}" "llvmlite@${{ matrix.spec.deps.llvmlite }}" --python "${{ steps.install_python.outputs.python-version }}" | |
if: ${{ matrix.spec.deps.numba != null && matrix.spec.deps.llvmlite != null }} | |
- run: poetry2conda --dev pyproject.toml - | tee environment.yaml | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
mamba-version: "*" | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
channel-priority: strict | |
activate-environment: numbsql | |
python-version: ${{ matrix.spec.deps.python-version }} | |
environment-file: environment.yaml | |
- run: pip install . | |
- run: pytest --numprocesses auto | |
env: | |
NUMBA_CAPTURED_ERRORS: ${{ matrix.spec.env.NUMBA_CAPTURED_ERRORS }} | |
dry-run-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable-small | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: numbsql | |
extraPullNames: nix-community,poetry2nix | |
- name: setup git info | |
run: | | |
set -euo pipefail | |
git config user.name 'phillip-ground[bot]' | |
git config user.email 'phillip-ground[bot]@users.noreply.github.com' | |
- name: dry run semantic-release | |
run: ./ci/release/dry_run.sh | |
release: | |
runs-on: ubuntu-latest | |
needs: | |
- conda | |
- dry-run-release | |
- nix | |
steps: | |
- uses: actions/[email protected] | |
id: generate_token | |
with: | |
app-id: ${{ secrets.APP_ID }} | |
private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ steps.generate_token.outputs.token }} | |
- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable-small | |
- uses: cachix/cachix-action@v15 | |
with: | |
name: numbsql | |
extraPullNames: nix-community,poetry2nix | |
- name: run semantic-release | |
run: ./ci/release/run.sh | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | |
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} |