From 813102d2fee161428ccf2f7a79b67869f9a6e362 Mon Sep 17 00:00:00 2001 From: Amelia Cuss Date: Sun, 28 Apr 2024 11:13:15 +0300 Subject: [PATCH] Revert "workflows: use Nix in CI." This reverts commit 16a115237e429e4939e20885e4b42d1dd03c1b27. --- .github/workflows/spec.yml | 9 +++--- .github/workflows/zig.yml | 38 +++++++++++++++---------- .gitignore | 1 - flake.lock | 58 -------------------------------------- flake.nix | 38 ------------------------- 5 files changed, 27 insertions(+), 117 deletions(-) delete mode 100644 flake.lock delete mode 100644 flake.nix diff --git a/.github/workflows/spec.yml b/.github/workflows/spec.yml index b96f247..560b5ce 100644 --- a/.github/workflows/spec.yml +++ b/.github/workflows/spec.yml @@ -10,8 +10,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@v4 - - name: Run the Magic Nix Cache - uses: DeterminateSystems/magic-nix-cache-action@v2 - - run: nix build '.?submodules=1#specs' -L + - uses: goto-bus-stop/setup-zig@v1 + with: + version: 0.11.0 + - run: make spec diff --git a/.github/workflows/zig.yml b/.github/workflows/zig.yml index 73bb473..8eb1e9c 100644 --- a/.github/workflows/zig.yml +++ b/.github/workflows/zig.yml @@ -5,20 +5,29 @@ on: pull_request: jobs: - test-nix: - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - runs-on: ${{ matrix.os }} + test-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + - uses: goto-bus-stop/setup-zig@v1 + with: + version: 0.11.0 + - run: zig build + - run: zig build test + test-macos: + runs-on: macos-latest steps: - uses: actions/checkout@v3 with: submodules: recursive - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@v4 - - name: Run the Magic Nix Cache - uses: DeterminateSystems/magic-nix-cache-action@v2 - - run: nix build '.?submodules=1' -L + - uses: goto-bus-stop/setup-zig@v1 + with: + version: 0.11.0 + - run: brew install pcre + - run: zig build + - run: zig build test test-windows: runs-on: windows-latest steps: @@ -39,8 +48,7 @@ jobs: - uses: actions/checkout@v3 with: submodules: recursive - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@v4 - - name: Run the Magic Nix Cache - uses: DeterminateSystems/magic-nix-cache-action@v2 - - run: nix develop --command zig fmt --check src/*.zig + - uses: goto-bus-stop/setup-zig@v1 + with: + version: 0.11.0 + - run: zig fmt --check src/*.zig diff --git a/.gitignore b/.gitignore index 0253336..3660f42 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ /zig-* koino.code-workspace -/result* diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 65b2d0a..0000000 --- a/flake.lock +++ /dev/null @@ -1,58 +0,0 @@ -{ - "nodes": { - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1692799911, - "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", - "type": "github" - }, - "original": { - "id": "flake-utils", - "type": "indirect" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1693145325, - "narHash": "sha256-Gat9xskErH1zOcLjYMhSDBo0JTBZKfGS0xJlIRnj6Rc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "cddebdb60de376c1bdb7a4e6ee3d98355453fe56", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index de8009d..0000000 --- a/flake.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - outputs = { - self, - nixpkgs, - flake-utils, - ... - }: - flake-utils.lib.eachDefaultSystem (system: let - pkgs = nixpkgs.legacyPackages.${system}; - inherit (pkgs) lib; - in rec { - packages.default = pkgs.stdenv.mkDerivation { - name = "koino-build"; - - src = ./.; - - nativeBuildInputs = [pkgs.zig pkgs.pcre pkgs.python311]; - - buildPhase = '' - export ZIG_GLOBAL_CACHE_DIR="$TMPDIR/zig" - zig build test - touch $out - ''; - - dontInstall = true; - }; - - packages.specs = packages.default.overrideAttrs { - buildPhase = '' - export ZIG_GLOBAL_CACHE_DIR="$TMPDIR/zig" - make spec - touch $out - ''; - }; - - formatter = pkgs.alejandra; - }); -}