Generate updated docs #3197
This file contains hidden or 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 Anixpkgs" | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| env: | |
| NIXOS_VERSION: 25.11 | |
| jobs: | |
| lint: | |
| name: Check Lint Nix Files | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.head_ref || github.ref_name }} | |
| fetch-depth: 0 | |
| ssh-key: ${{ secrets.ANIXBOT_DEPLOY_KEY }} | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-${{ env.NIXOS_VERSION }} | |
| - run: | | |
| branch=${{ github.head_ref || github.ref_name }} | |
| git config user.name "goromal (bot)" | |
| git config user.email "goromal.bot@gmail.com" | |
| nix-shell -p nixfmt --run "bash scripts/lint.sh" | |
| num_changes=$(git status --porcelain=v1 2>/dev/null | wc -l) | |
| if [[ $num_changes -ge 1 ]]; then | |
| echo "Committing linting changes" | |
| git add . | |
| git commit -m "Lint format" | |
| git push origin $branch | |
| else | |
| echo "No linting changes to commit" | |
| fi | |
| nix-shell -p nixfmt --run "bash scripts/lint.sh check" | |
| check-flake-lock: | |
| name: Check Flake Lock Sync | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.head_ref || github.ref_name }} | |
| fetch-depth: 0 | |
| ssh-key: ${{ secrets.ANIXBOT_DEPLOY_KEY }} | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-${{ env.NIXOS_VERSION }} | |
| - run: | | |
| branch=${{ github.head_ref || github.ref_name }} | |
| git config user.name "goromal (bot)" | |
| git config user.email "goromal.bot@gmail.com" | |
| python scripts/update_deps.py | |
| num_changes=$(git status --porcelain=v1 2>/dev/null | wc -l) | |
| if [[ $num_changes -ge 1 ]]; then | |
| echo "Committing changes to flake lock" | |
| git add . | |
| git commit -m "Update flake lock" | |
| git push origin $branch | |
| else | |
| echo "No lock changes to commit" | |
| fi | |
| nix flake lock --no-update-lock-file | |
| check-deps: | |
| name: Check Dependencies | |
| needs: check-flake-lock | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-${{ env.NIXOS_VERSION }} | |
| - run: | | |
| num_side_branches=$(python scripts/check_deps.py | wc -l) | |
| if [[ $num_side_branches -ge 1 ]]; then | |
| echo "ERROR: Detected $num_side_branches dependencies on a side branch" | |
| exit 1 | |
| else | |
| echo "No dependencies detected on a side branch" | |
| fi | |
| envs: | |
| name: Build Environments | |
| needs: check-flake-lock | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-${{ env.NIXOS_VERSION }} | |
| - uses: cachix/cachix-action@v14 | |
| with: | |
| name: github-public | |
| authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - run: > | |
| git config --global url."https://github.com/".insteadOf ssh://git@github.com/ | |
| - run: ./scripts/build_envs.sh | |
| cpp: | |
| name: C++ Packages | |
| needs: envs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-${{ env.NIXOS_VERSION }} | |
| - uses: cachix/cachix-action@v14 | |
| with: | |
| name: github-public | |
| authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - run: > | |
| git config --global url."https://github.com/".insteadOf ssh://git@github.com/ | |
| - run: ./scripts/build_pkgs.sh cpp | |
| rust: | |
| name: Rust Packages | |
| needs: envs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-${{ env.NIXOS_VERSION }} | |
| - uses: cachix/cachix-action@v14 | |
| with: | |
| name: github-public | |
| authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - run: > | |
| git config --global url."https://github.com/".insteadOf ssh://git@github.com/ | |
| - run: ./scripts/build_pkgs.sh rust | |
| python: | |
| name: Python Packages | |
| needs: cpp | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-${{ env.NIXOS_VERSION }} | |
| - uses: cachix/cachix-action@v14 | |
| with: | |
| name: github-public | |
| authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - run: > | |
| git config --global url."https://github.com/".insteadOf ssh://git@github.com/ | |
| - run: ./scripts/build_pkgs.sh python | |
| bash: | |
| name: Bash Packages | |
| needs: python | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-${{ env.NIXOS_VERSION }} | |
| - uses: cachix/cachix-action@v14 | |
| with: | |
| name: github-public | |
| authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - run: > | |
| git config --global url."https://github.com/".insteadOf ssh://git@github.com/ | |
| - run: ./scripts/build_pkgs.sh bash | |
| java: | |
| name: Java Packages | |
| needs: envs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-${{ env.NIXOS_VERSION }} | |
| - uses: cachix/cachix-action@v14 | |
| with: | |
| name: github-public | |
| authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - run: > | |
| git config --global url."https://github.com/".insteadOf ssh://git@github.com/ | |
| - run: ./scripts/build_pkgs.sh java | |
| generate-docs-dry: | |
| name: Generate Docs (Dry Run) | |
| needs: | |
| - cpp | |
| - rust | |
| - python | |
| - bash | |
| - java | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-${{ env.NIXOS_VERSION }} | |
| - uses: cachix/cachix-action@v14 | |
| with: | |
| name: github-public | |
| authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - run: | | |
| NIXPKGS_ALLOW_UNFREE=1 python scripts/generate_docs.py | |
| num_changes=$(git status --porcelain=v1 2>/dev/null | wc -l) | |
| if [[ $num_changes -ge 1 ]]; then | |
| echo "Found changes to $num_changes docs" | |
| else | |
| echo "No detected changes to auto-generated docs" | |
| fi | |
| regression: | |
| name: Regression Tests | |
| needs: | |
| - cpp | |
| - rust | |
| - python | |
| - bash | |
| - java | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-${{ env.NIXOS_VERSION }} | |
| - uses: cachix/cachix-action@v14 | |
| with: | |
| name: github-public | |
| authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - run: > | |
| cd test && nix-shell --run "bash test.sh" | |
| machines: | |
| name: Machine Checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: cachix/install-nix-action@v31 | |
| with: | |
| nix_path: nixpkgs=channel:nixos-${{ env.NIXOS_VERSION }} | |
| - uses: cachix/cachix-action@v14 | |
| with: | |
| name: github-public | |
| authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - run: > | |
| bash scripts/check_machines.sh |