From 2b9f82a5096440660d791c6fa97baae97a5d2843 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Sun, 21 May 2023 11:46:19 -0500 Subject: [PATCH] ci: add github actions config --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a90ab7f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +name: Nightly + +on: + push: + paths: + - "**.zig" + branches: + - main + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: goto-bus-stop/setup-zig@v2 + with: + version: master + - uses: actions/checkout@v3 + - run: zig fmt src/**/*.zig + test: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{matrix.os}} + steps: + - uses: goto-bus-stop/setup-zig@v2 + with: + version: master + - uses: actions/checkout@v3 + - run: zig build test + bench: + runs-on: ubuntu-latest + steps: + - uses: goto-bus-stop/setup-zig@v2 + with: + version: master + - uses: actions/checkout@v3 + - run: zig build -Doptimize=ReleaseFast -Dcpu=baseline bench