Skip to content

Update flake.lock

Update flake.lock #886

Workflow file for this run

name: "Test"
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
check-and-update:
name: "πŸ” Check and update hash"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 2
persist-credentials: false
- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
with:
nix_path: nixpkgs=./nix/nixpkgs.nix
- uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with:
name: cbley
extraPullNames: pre-commit-hooks
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix flake check
- name: Set author identity and push url
run: |-
git config user.email '${{ github.actor }}@users.noreply.github.com'
git config user.name '${{ github.actor }}'
git remote set-url --push origin https://x-access-token:${{ secrets.PR_TOKEN }}@github.com/${{ github.repository }}
- name: Update bazel-central-registry flake input
if: github.event.pull_request.user.login == 'renovate[bot]' && github.repository == 'avdv/replay'
run: |-
git switch -c pr-branch ${{ github.event.pull_request.head.sha }}
nix flake lock --update-input bazel-central-registry --commit-lock-file
- name: Update replay.deps hash
id: hash-update
if: github.event_name == 'pull_request' && github.repository == 'avdv/replay'
run: |-
nix develop --command .github/update-hash replay.deps
echo exit=$( git diff --quiet flake.nix ; echo $? ) >> "$GITHUB_OUTPUT"
- name: Push changes to PR
if: steps.hash-update.outputs.exit != '0'
run: |-
git commit -m 'Update replay.deps hash' flake.nix
git push origin HEAD:${{ github.head_ref }}
exit 1
test-package:
name: "πŸ”¨ Build & Run (package)"
needs:
- check-and-update
strategy:
matrix:
os:
- ubuntu-latest
- macos-13
- macos-14
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
with:
nix_path: nixpkgs=./nix/nixpkgs.nix
- uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with:
name: cbley
extraPullNames: pre-commit-hooks
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
# Only needed for private caches
#authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build --print-build-logs
- run: nix run . -- --help
test-shell:
name: "πŸ”¨ Build & Run (shell)"
strategy:
matrix:
os:
- ubuntu-latest
- macos-13
- macos-14
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
with:
nix_path: nixpkgs=./nix/nixpkgs.nix
- uses: cachix/cachix-action@ad2ddac53f961de1989924296a1f236fcfbaa4fc # v15
with:
name: cbley
extraPullNames: pre-commit-hooks
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
# Only needed for private caches
#authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Set up BuildBuddy
env:
BUILDBUDDY_API_KEY: '${{ secrets.BUILDBUDDY_API_KEY }}'
run: |
if [ -z "$BUILDBUDDY_API_KEY" ]; then
cache_setting='build --noremote_upload_local_results'
else
cache_setting="build --remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY"
fi
cat > .bazelrc.local <<EOF
startup --max_idle_secs=5
common --config=ci
$cache_setting
EOF
cat > ~/.netrc <<EOF
machine api.github.com
password ${{ secrets.GITHUB_TOKEN }}
EOF
- run: nix develop --command bazel build ...
- run: nix develop --command bazel run -- //:replay --help