Compare commits

...

14 commits

Author SHA1 Message Date
05af1a15f1 use custom action 2025-09-15 17:03:56 +03:00
c813cb28ad simpler haha 2025-09-15 16:59:43 +03:00
3b19d429ce weird syntax 2025-09-15 16:56:41 +03:00
5ce23054d9 does this work 2025-09-15 16:54:21 +03:00
8d5c8245c2 try 2025-09-15 16:52:42 +03:00
7020149e6d no concurrency 2025-09-15 16:45:34 +03:00
05672d4b09 will this work? 2025-09-15 16:42:54 +03:00
009dfd4cd5 was this the problem 2025-09-15 16:29:36 +03:00
82cad3c0dd i wonder 2025-09-15 16:26:34 +03:00
6d14def506 add attic 2025-09-15 16:21:02 +03:00
73e5ab059f formatting 2025-09-15 16:00:11 +03:00
f83a04eba7 wtf 2025-09-15 15:51:49 +03:00
04d828f9d8 no tag 2025-09-15 15:37:39 +03:00
1080b3a8cc add tailscale 2025-09-15 15:36:09 +03:00
3 changed files with 118 additions and 17 deletions

67
.github/actions/setup-nix/action.yml vendored Normal file
View file

@ -0,0 +1,67 @@
name: setup-nix
inputs:
system:
type: string
required: true
sandbox:
type: string
default: "true"
runs:
using: composite
steps:
- name: reclaim space (linux)
if: runner.os == 'Linux'
uses: wimpysworld/nothing-but-nix@main
with:
hatchet-protocol: rampage
- name: reclaim space (darwin)
if: runner.os == 'macOS'
shell: bash
run: |
echo "::group::disk space (before)"
sudo df -h
echo "::endgroup::"
echo "::group::disable mds"
sudo mdutil -i off -a || echo "mdutil failed"
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist \
|| echo "launchctl unload failed"
echo "::endgroup::"
echo "Background space expansion started. /nix will grow as space becomes available."
sudo rm -rf \
/Applications/Xcode_* \
/Library/Developer/CoreSimulator \
/Library/Frameworks \
/Users/runner/.dotnet \
/Users/runner/.rustup \
/Users/runner/Library/Android \
/Users/runner/Library/Caches \
/Users/runner/Library/Developer/CoreSimulator \
/Users/runner/hostedtoolcache &
- name: install nix
uses: cachix/install-nix-action@v31
with:
# Putting build-dir in /nix is a workaround for https://github.com/wimpysworld/nothing-but-nix/issues/18
extra_nix_config: |
build-dir = /nix/build
sandbox = ${{ inputs.sandbox }}
system = ${{ inputs.system }}
- name: create build-dir
shell: bash
run: sudo mkdir -p /nix/build
- name: post setup-nix
if: runner.os == 'macOS'
uses: srz-zumix/post-run-action@v2
with:
shell: bash -e {0}
post-run: |
echo "::group::disk space (after)"
sudo df -h
echo "::endgroup::"

View file

@ -4,23 +4,57 @@ on:
push: push:
workflow_dispatch: workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
build: build:
runs-on: ubuntu-24.04 strategy:
fail-fast: false
matrix:
system:
- x86_64-linux
- aarch64-linux
- x86_64-darwin
runs-on: ${{ matrix.system == 'x86_64-linux' && 'ubuntu-24.04'
|| matrix.system == 'aarch64-linux' && 'ubuntu-24.04-arm'
|| matrix.system == 'x86_64-darwin' && 'macos-latest' }}
steps: steps:
- name: Checkout the repository - name: Checkout the repository
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install nix - name: setup nix
uses: cachix/install-nix-action@v16 uses: ./.github/actions/setup-nix
with:
system: ${{ matrix.system }}
- name: Login to tailscale
uses: tailscale/github-action@v3.2.3
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
hostname: ${{ matrix.system == 'x86_64-linux' && 'github-actions-x86-64-linux'
|| matrix.system == 'aarch64-linux' && 'github-actions-aarch64-linux'
|| matrix.system == 'x86_64-darwin' && 'github-actions-x86-64-darwin' }}
tags: tag:ci
- name: Check if Attic endpoint is reachable
id: check_attic
run: |
if curl --connect-timeout 5 --silent --head http://wallfacer.curl-boga.ts.net:7080 | grep "200 OK"; then
echo "reachable=true" >> $GITHUB_OUTPUT
else
echo "reachable=false" >> $GITHUB_OUTPUT
fi
# TODO: add a binary cache - name: Setup Attic cache
# - uses: cachix/cachix-action@v10 if: steps.check_attic.outputs.reachable == 'true'
# with: uses: ryanccn/attic-action@v0.3.1
# name: YOURCACHE with:
# authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' endpoint: http://wallfacer.curl-boga.ts.net:7080
cache: main
token: ${{ secrets.ATTIC_TOKEN }}
- name: Check the flake - name: Check the flake
run: nix flake check --accept-flake-config run: nix flake check --accept-flake-config

View file

@ -5,14 +5,14 @@
# provider = "ollama"; # provider = "ollama";
# provider = "claude"; # provider = "claude";
providers = { providers = {
# claude = { # claude = {
# endpoint = "https://api.anthropic.com"; # endpoint = "https://api.anthropic.com";
# extra_request_body = { # extra_request_body = {
# max_tokens = 4096; # max_tokens = 4096;
# temperature = 0; # temperature = 0;
# }; # };
# model = "claude-3-5-sonnet-20240620"; # model = "claude-3-5-sonnet-20240620";
# }; # };
ollama = { ollama = {
endpoint = "http://localhost:11434"; endpoint = "http://localhost:11434";
model = "qwen2.5-coder:32b"; model = "qwen2.5-coder:32b";