Compare commits
14 commits
db9189edfc
...
05af1a15f1
| Author | SHA1 | Date | |
|---|---|---|---|
| 05af1a15f1 | |||
| c813cb28ad | |||
| 3b19d429ce | |||
| 5ce23054d9 | |||
| 8d5c8245c2 | |||
| 7020149e6d | |||
| 05672d4b09 | |||
| 009dfd4cd5 | |||
| 82cad3c0dd | |||
| 6d14def506 | |||
| 73e5ab059f | |||
| f83a04eba7 | |||
| 04d828f9d8 | |||
| 1080b3a8cc |
3 changed files with 118 additions and 17 deletions
67
.github/actions/setup-nix/action.yml
vendored
Normal file
67
.github/actions/setup-nix/action.yml
vendored
Normal 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::"
|
||||||
52
.github/workflows/ci.yml
vendored
52
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue