From c51da2a3673b4ab5de167d15190fb576fbae6c18 Mon Sep 17 00:00:00 2001 From: BitlyTwiser Date: Fri, 20 Sep 2024 13:17:36 -0700 Subject: [PATCH] Readme updates and a smal build script --- .github/workflows/build.yml | 22 ++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..aaf4410 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: Build and Test + +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + build-linux: + name: Build & Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install Zig + run: "sudo snap install zig --classic --beta" + + - name: Build & Test + run: zig build test \ No newline at end of file diff --git a/README.md b/README.md index 82ef82a..81fe69c 100644 --- a/README.md +++ b/README.md @@ -37,4 +37,6 @@ Zig (at the time of this writing) does not have a solid way of directly adjustin will only adjust the env map for the scope of this execution (i.e. scope of the current calling function). After function exit, the map goes back to its previous state. +Therefore, we do make a C call to store the env variables that are parsed. So linking libC and running tests with ```--library c``` is needed + Using the package is as simple as the above code examples. import below using zig zon, load the .env, and access the variables as needed using std.process.EnvMap :)