build #1757
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: build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: "0 12 * * *" | |
permissions: | |
contents: read | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: '1.10.2' | |
- uses: julia-actions/cache@v2 | |
- name: Install JuliaFormatter and format | |
run: | | |
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))' | |
- uses: pre-commit/[email protected] | |
flake8-lint: | |
runs-on: ubuntu-latest | |
name: Lint | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: flake8 Lint | |
uses: py-actions/flake8@v2 | |
with: | |
max-line-length: "100" | |
args: | |
"--exit-zero" | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Mambaforge | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-version: latest | |
activate-environment: env | |
use-mamba: true | |
python-version: "3.11" | |
- name: Add conda to system path | |
run: | | |
echo $CONDA/bin >> $GITHUB_PATH | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
- name: Install dependencies | |
env: | |
UV_SYSTEM_PYTHON: 1 | |
run: | | |
sudo apt-get install -y libglu1-mesa | |
mamba install slepc4py=*=complex* uv -y | |
uv pip install -r pyproject.toml | |
- name: Build package | |
env: | |
UV_SYSTEM_PYTHON: 1 | |
run: | | |
uv build |