diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b437c164..d41c06a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -137,7 +137,24 @@ jobs: run: zig build -Doptimize=ReleaseSmall --summary all working-directory: examples/${{ matrix.example_dir }} - + validate-foundation-libc: + name: Validate Foundation Libc + continue-on-error: true + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Zig + uses: mlugg/setup-zig@v1 + with: + version: ${{ env.ZIG_VERSION }} + - name: Generate and validate packages + working-directory: modules/foundation-libc + run: | + zig build validate build-website: name: Build Website diff --git a/build.zig.zon b/build.zig.zon index 04cb51e0..4e887a38 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -11,6 +11,9 @@ .@"tools/regz" = .{ .path = "tools/regz" }, .@"tools/uf2" = .{ .path = "tools/uf2" }, + // modules + .@"modules/foundation-libc" = .{ .path = "modules/foundation-libc" }, + // ports .@"port/espressif/esp" = .{ .path = "port/espressif/esp", .lazy = true }, .@"port/gigadevice/gd32" = .{ .path = "port/gigadevice/gd32", .lazy = true }, diff --git a/modules/foundation-libc/.github/workflows/build.yml b/modules/foundation-libc/.github/workflows/build.yml deleted file mode 100644 index 2395a232..00000000 --- a/modules/foundation-libc/.github/workflows/build.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Continuous Integration - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build: - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - - runs-on: ${{ matrix.os }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Zig - uses: mlugg/setup-zig@v1 - with: - version: 0.13.0 - - - name: Generate and validate packages - working-directory: test - run: | - zig build validate diff --git a/modules/foundation-libc/LICENCE b/modules/foundation-libc/LICENSE similarity index 100% rename from modules/foundation-libc/LICENCE rename to modules/foundation-libc/LICENSE diff --git a/modules/foundation-libc/flake.lock b/modules/foundation-libc/flake.lock deleted file mode 100644 index 1e42e19b..00000000 --- a/modules/foundation-libc/flake.lock +++ /dev/null @@ -1,164 +0,0 @@ -{ - "nodes": { - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1718478900, - "narHash": "sha256-v43N1gZLcGkhg3PdcrKUNIZ1L0FBzB2JqhIYEyKAHEs=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "c884223af91820615a6146af1ae1fea25c107005", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1708161998, - "narHash": "sha256-6KnemmUorCvlcAvGziFosAVkrlWZGIc6UNT9GUYr0jQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "84d981bae8b5e783b3b548de505b22880559515f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs", - "zig": "zig" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "zig": { - "inputs": { - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1718324667, - "narHash": "sha256-AZGskEGjvUmeb+fgBv4lxtCUtXmYBI+ABOlV+og9X14=", - "owner": "mitchellh", - "repo": "zig-overlay", - "rev": "b2c14e5f842af6b2bf03e634f73fd84f6956d4ba", - "type": "github" - }, - "original": { - "owner": "mitchellh", - "repo": "zig-overlay", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/modules/foundation-libc/flake.nix b/modules/foundation-libc/flake.nix deleted file mode 100644 index 4759faac..00000000 --- a/modules/foundation-libc/flake.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ - description = "foundation libc development environment"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/release-23.11"; - flake-utils.url = "github:numtide/flake-utils"; - - # required for latest zig - zig.url = "github:mitchellh/zig-overlay"; - - # Used for shell.nix - flake-compat = { - url = github:edolstra/flake-compat; - flake = false; - }; - }; - - outputs = { - self, - nixpkgs, - flake-utils, - ... - } @ inputs: let - overlays = [ - # Other overlays - (final: prev: { - zigpkgs = inputs.zig.packages.${prev.system}; - }) - ]; - - # Our supported systems are the same supported systems as the Zig binaries - systems = builtins.attrNames inputs.zig.packages; - in - flake-utils.lib.eachSystem systems ( - system: let - pkgs = import nixpkgs {inherit overlays system;}; - in rec { - devShells.default = pkgs.mkShell { - nativeBuildInputs = [ - pkgs.zigpkgs."0.13.0" - pkgs.llvmPackages.clangUseLLVM - ]; - - buildInputs = [ - # we need a version of bash capable of being interactive - # as opposed to a bash just used for building this flake - # in non-interactive mode - pkgs.bashInteractive - ]; - - # see https://github.com/NixOS/nixpkgs/issues/18995 - hardeningDisable = ["all"]; - - shellHook = '' - # once we set SHELL to point to the interactive bash, neovim will - # launch the correct $SHELL in its :terminal - export SHELL=${pkgs.bashInteractive}/bin/bash - ''; - }; - - # For compatibility with older versions of the `nix` binary - devShell = self.devShells.${system}.default; - } - ); -}