Something went wrong. Try again.
Nix flake for OpenAI Codex CLI - native Rust binary, hourly updates, multi-platform caching
Something went wrong. Try again.
1.5 kB · 58 lines
YAML
at main
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859name: "Build and Cache"on: push: branches: [ main ] pull_request: branches: [ main ] workflow_dispatch: workflow_run: workflows: ["Check for Updates"] types: - completed branches: [ main ]
jobs: build: if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest] variant: [codex, codex-node] steps: - uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31 with: nix_path: nixpkgs=channel:nixos-unstable extra_nix_config: | experimental-features = nix-command flakes access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} env: NIX_FIRST_BUILD_UID: 400
- uses: cachix/cachix-action@v15 if: github.ref == 'refs/heads/main' with: name: codex-cli authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build ${{ matrix.variant }} run: | nix build .#${{ matrix.variant }}
- name: Push to Cachix if: github.ref == 'refs/heads/main' run: | nix build .#${{ matrix.variant }} --json | jq -r '.[].outputs.out' | cachix push codex-cli
- name: Test ${{ matrix.variant }} run: | case "${{ matrix.variant }}" in codex) ./result/bin/codex --version ;; codex-node) ./result/bin/codex-node --version ;; esac