From 2f69012046efe349a4f59b9f213a3cfb911bded5 Mon Sep 17 00:00:00 2001 From: Chris Heyes <22148308+hazeycode@users.noreply.github.com> Date: Tue, 5 Nov 2024 18:52:07 +0000 Subject: [PATCH] CI --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++++++++ .zigversion | 1 + 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 .zigversion diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..7887c5c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +name: ci +on: + pull_request: + branches: + - main + push: + branches: + - main +concurrency: + # Cancels pending runs when a PR gets updated. + group: ${{ github.head_ref || github.run_id }}-${{ github.actor }} + cancel-in-progress: true +jobs: + lint-and-build-and-test: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{matrix.os}} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Read .zig-version + id: zigversion + uses: juliangruber/read-file-action@v1 + with: + path: ./.zigversion + - name: Install Zig + uses: mlugg/setup-zig@v1 + with: + version: ${{ steps.zigversion.outputs.content }} + - name: Check format + continue-on-error: true + run: zig fmt --check . + - name: Build and run tests + run: zig build test diff --git a/.zigversion b/.zigversion new file mode 100644 index 0000000..867eba6 --- /dev/null +++ b/.zigversion @@ -0,0 +1 @@ +0.14.0-dev.1911+3bf89f55c \ No newline at end of file