[object Object]

← back to Exo

typecheck on ubuntu with install-nix-action

76ed8a516ba9caa9617500abd00af92623548124 · 2025-10-10 16:15:39 +0100 · Alex Cheema

Co-authored-by: Evan <evanev7@gmail.com>

Files touched

Diff

commit 76ed8a516ba9caa9617500abd00af92623548124
Author: Alex Cheema <41707476+AlexCheema@users.noreply.github.com>
Date:   Fri Oct 10 16:15:39 2025 +0100

    typecheck on ubuntu with install-nix-action
    
    Co-authored-by: Evan <evanev7@gmail.com>
---
 .github/workflows/pipeline.yml | 163 ++++++++++++++++++++---------------------
 flake.nix                      |   6 +-
 typings/.gitkeep               |   0
 3 files changed, 82 insertions(+), 87 deletions(-)

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,67 +12,16 @@ on:
 
 jobs:
   typecheck:
-    runs-on: ['self-hosted', 'macOS']
+    runs-on: ubuntu-latest
     steps:
       - name: Checkout repository
         uses: actions/checkout@v4
         with:
           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 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/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
+      - uses: cachix/install-nix-action@v31
         with:
-          fetch-depth: 0
-          token: ${{ secrets.GITHUB_TOKEN }}
-          lfs: true
+          nix_path: nixpkgs=channel:nixos-unstable
 
       - name: Configure git user
         run: |
@@ -86,17 +35,6 @@ jobs:
           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..."
@@ -124,23 +62,80 @@ jobs:
           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
+      - uses: ./.github/actions/typecheck
 
-      - 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

← e8a6efe2 add kimi k2  ·  back to Exo  ·  new tagged union 1c6b5ce9 →