diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 71ba82f8..544fef21 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -12,13 +12,17 @@ on: jobs: typecheck: - runs-on: ['self-hosted', 'macOS'] + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 with: lfs: true + - uses: cachix/install-nix-action@v31 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: Configure git user run: | git config --local user.email "github-actions@users.noreply.github.com" @@ -59,88 +63,79 @@ jobs: shell: bash - uses: ./.github/actions/typecheck - ci: - needs: typecheck - runs-on: ['self-hosted', 'macOS'] - permissions: - contents: read - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.GITHUB_TOKEN }} - lfs: true - - name: Configure git user - run: | - git config --local user.email "github-actions@users.noreply.github.com" - git config --local user.name "github-actions bot" - shell: bash - - - name: Pull LFS files - run: | - echo "Pulling Git LFS files..." - git lfs pull - shell: bash - - - name: Setup EXO_HOME and API_PORT - run: | - EXO_HOME=$(mktemp -d -t exo-ci-XXXXXXXX) - # Generate random port (macOS compatible method) - API_PORT=$((49152 + RANDOM % (65535 - 49152 + 1))) - echo "EXO_HOME=$EXO_HOME" >> $GITHUB_ENV - echo "API_PORT=$API_PORT" >> $GITHUB_ENV - echo "Created EXO_HOME: $EXO_HOME" - echo "Generated API_PORT: $API_PORT" - shell: bash - - - name: Setup Nix Environment - run: | - echo "Checking for nix installation..." - - # Check if nix binary exists directly - if [ -f /nix/var/nix/profiles/default/bin/nix ]; then - echo "Found nix binary at /nix/var/nix/profiles/default/bin/nix" - export PATH="/nix/var/nix/profiles/default/bin:$PATH" - echo "PATH=$PATH" >> $GITHUB_ENV - nix --version - elif [ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]; then - echo "Found nix profile script, sourcing..." - source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh - nix --version - elif command -v nix >/dev/null 2>&1; then - echo "Nix already in PATH" - nix --version - else - echo "Nix not found. Debugging info:" - echo "Contents of /nix/var/nix/profiles/default/:" - ls -la /nix/var/nix/profiles/default/ 2>/dev/null || echo "Directory not found" - echo "Contents of /nix/var/nix/profiles/default/bin/:" - ls -la /nix/var/nix/profiles/default/bin/ 2>/dev/null || echo "Directory not found" - exit 1 - fi - shell: bash - - - name: Build forwarder - run: | - echo "Building Go forwarder binary..." - nix --extra-experimental-features nix-command --extra-experimental-features flakes develop --command just build-forwarder - shell: bash - - - uses: ./.github/actions/verify-clean - with: - step: regenerate-protobufs - - - uses: ./.github/actions/lint-check - - - uses: ./.github/actions/unit-test - - - name: Cleanup EXO_HOME - run: | - echo "Cleaning up EXO_HOME: $EXO_HOME" - rm -rf "$EXO_HOME" - shell: bash - if: always() +# ci: +# needs: typecheck +# runs-on: ubuntu-latest +# permissions: +# contents: read +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# steps: +# - name: Checkout repository +# uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# token: ${{ secrets.GITHUB_TOKEN }} +# lfs: true +# +# - name: Configure git user +# run: | +# git config --local user.email "github-actions@users.noreply.github.com" +# git config --local user.name "github-actions bot" +# shell: bash +# +# - name: Pull LFS files +# run: | +# echo "Pulling Git LFS files..." +# git lfs pull +# shell: bash +# +# - name: Setup EXO_HOME and API_PORT +# run: | +# EXO_HOME=$(mktemp -d -t exo-ci-XXXXXXXX) +# # Generate random port (macOS compatible method) +# API_PORT=$((49152 + RANDOM % (65535 - 49152 + 1))) +# echo "EXO_HOME=$EXO_HOME" >> $GITHUB_ENV +# echo "API_PORT=$API_PORT" >> $GITHUB_ENV +# echo "Created EXO_HOME: $EXO_HOME" +# echo "Generated API_PORT: $API_PORT" +# shell: bash +# +# - name: Setup Nix Environment +# run: | +# echo "Checking for nix installation..." +# +# # Check if nix binary exists directly +# if [ -f /nix/var/nix/profiles/default/bin/nix ]; then +# echo "Found nix binary at /nix/var/nix/profiles/default/bin/nix" +# export PATH="/nix/var/nix/profiles/default/bin:$PATH" +# echo "PATH=$PATH" >> $GITHUB_ENV +# nix --version +# elif [ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]; then +# echo "Found nix profile script, sourcing..." +# source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh +# nix --version +# elif command -v nix >/dev/null 2>&1; then +# echo "Nix already in PATH" +# nix --version +# else +# echo "Nix not found. Debugging info:" +# echo "Contents of /nix/var/nix/profiles/default/:" +# ls -la /nix/var/nix/profiles/default/ 2>/dev/null || echo "Directory not found" +# echo "Contents of /nix/var/nix/profiles/default/bin/:" +# ls -la /nix/var/nix/profiles/default/bin/ 2>/dev/null || echo "Directory not found" +# exit 1 +# fi +# shell: bash +# +# - uses: ./.github/actions/lint-check +# +# - uses: ./.github/actions/unit-test +# +# - name: Cleanup EXO_HOME +# run: | +# echo "Cleaning up EXO_HOME: $EXO_HOME" +# rm -rf "$EXO_HOME" +# shell: bash +# if: always() diff --git a/flake.nix b/flake.nix index 118fb97f..bf68d702 100644 --- a/flake.nix +++ b/flake.nix @@ -57,13 +57,13 @@ # NIX nixpkgs-fmt + + # JUST + just ] ++ (pkgs.lib.optionals pkgs.stdenv.isDarwin [ # MACMON macmon - - # JUST - just ]); shellHook = '' diff --git a/typings/.gitkeep b/typings/.gitkeep new file mode 100644 index 00000000..e69de29b