nix #131
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: nix | |
on: | |
push: | |
paths: | |
- "**.py" | |
- "**.rst" | |
- "**.nix" | |
- "**.lock" | |
- "pyproject.toml" | |
- "poetry.lock" | |
- ".pre-commit-config.yaml" | |
- ".github/workflows/*.yaml" | |
# Ignore small changes to documentation files | |
# (ReadTheDocs will build based on new README anyway.) | |
- "!README.rst" | |
- "!CHANGELOG.md" | |
branches: [master] | |
pull_request: | |
# also run periodically | |
schedule: | |
- cron: "41 7 * * 5" | |
jobs: | |
build: | |
name: Build fractopo with nix | |
strategy: | |
matrix: | |
# TODO: Fails on 38 for now | |
python-version: ["39", "310"] | |
platform: [ubuntu-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v17 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
extra_nix_config: "accept-flake-config = true" | |
install_url: https://releases.nixos.org/nix/nix-2.13.3/install | |
- uses: cachix/cachix-action@v12 | |
with: | |
name: fractopo | |
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
- name: Build with nix to ./fractopo-cli | |
run: | | |
nix -Lv build .#fractopo-${{ matrix.python-version }} --show-trace --out-link fractopo-cli | |
- name: Test built fractopo cli entrypoint | |
run: | | |
fractopo-cli/bin/fractopo --help |