Skip to content

Commit

Permalink
Setup CI
Browse files Browse the repository at this point in the history
  • Loading branch information
LVala committed Jul 20, 2024
1 parent 66ac097 commit d9a6274
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on: push

permissions:
contents: read

env:
ZIG_VERSION: 0.13.0

jobs:
build-test:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Install Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}

- name: Build
run: zig build

- name: Test
run: zig build test

build-kv-store:
name: Build kv_store example
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./examples/kv_store
steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Install Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}

- name: Build
run: zig build

check-formatting:
name: Check formatting
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Install Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: ${{ env.ZIG_VERSION }}

- name: Check formatting
run: zig fmt --check .

0 comments on commit d9a6274

Please sign in to comment.