Skip to content

refactor(xmtp_mls_common): store ComponentRegistry as one raw map val… #699

refactor(xmtp_mls_common): store ComponentRegistry as one raw map val…

refactor(xmtp_mls_common): store ComponentRegistry as one raw map val… #699

Workflow file for this run

name: Cache all Nix Outputs
on:
workflow_dispatch:
push:
branches:
- main
tags:
- v?[0-9]+.[0-9]+.[0-9]+*
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [warp-ubuntu-latest-x64-16x, warp-macos-26-arm64-12x]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-nix
with:
github-token: ${{ github.token }}
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Install omnix
run: nix profile install nixpkgs#omnix
- name: Build all flake outputs
run: om ci run --include-all-dependencies --results=om.json -- --keep-going
- name: Pin outputs to cachix
# if: github.ref_name == 'main'
run: |
BRANCH_NAME="${{ github.head_ref || github.ref_name }}"
SYSTEM=$(jq -r '.systems[0]' om.json)
jq -r --arg prefix "$BRANCH_NAME" --arg sys "$SYSTEM" \
'.result.omnix.build.byName | to_entries[] | "\($prefix)-\($sys)-\(.key) \(.value)"' \
om.json | while read -r pin_name store_path; do
echo "Pinning: $pin_name => $store_path"
cachix pin xmtp "$pin_name" "$store_path"
done
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
validation-image-aarch64:
runs-on: warp-ubuntu-latest-arm64-16x
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-nix
with:
github-token: ${{ github.token }}
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: Build validation service image
run: nix build .#validation-service-image-aarch64-unknown-linux-musl
- name: Pin to cachix
if: github.ref_name == 'main'
# Push synchronously before pinning. The cachix-action watch-store
# daemon uploads paths in the background, so a bare `cachix pin`
# races against it and fails with HTTP 400 when the path has not
# yet been pushed. `cachix push` is idempotent — a no-op if the
# path is already in the cache — so it is safe to always run.
run: |
cachix push xmtp ./result
cachix pin xmtp validation-service-image-aarch64 ./result
env:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}