mirror of
https://github.com/Tilo-K/csvu.git
synced 2026-07-03 11:43:02 +00:00
Upgrade csvu to Zig 0.16 (#2)
* Port source to Zig 0.16 * Declare Zig 0.16 toolchain * ci: add pr verification
This commit is contained in:
37
.github/workflows/ci.yaml
vendored
Normal file
37
.github/workflows/ci.yaml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
verify:
|
||||
name: Format, Test, Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Zig
|
||||
uses: mlugg/setup-zig@v2
|
||||
with:
|
||||
version: 0.16.0
|
||||
|
||||
- name: Check formatting
|
||||
run: zig fmt --check .
|
||||
|
||||
- name: Run tests
|
||||
run: zig build test
|
||||
|
||||
- name: Build
|
||||
run: zig build
|
||||
|
||||
- name: Build release mode
|
||||
run: zig build -Doptimize=ReleaseSafe
|
||||
9
.github/workflows/release.yaml
vendored
9
.github/workflows/release.yaml
vendored
@@ -51,20 +51,19 @@ jobs:
|
||||
- name: Install Zig
|
||||
uses: mlugg/setup-zig@v2
|
||||
with:
|
||||
version: 0.15.0
|
||||
version: 0.16.0
|
||||
|
||||
- name: Build for ${{ matrix.triple }}
|
||||
run: |
|
||||
zig build-exe "${SRC}" \
|
||||
zig build \
|
||||
-Dtarget=${{ matrix.triple }} \
|
||||
-O ReleaseSafe \
|
||||
-femit-bin="${BINARY_NAME}${{ matrix.ext }}"
|
||||
-Doptimize=ReleaseSafe
|
||||
|
||||
- name: Package binary
|
||||
run: |
|
||||
mkdir -p artifacts
|
||||
zip -j artifacts/"${BINARY_NAME}-${{ github.ref_name }}-${{ matrix.triple }}.zip" \
|
||||
"${BINARY_NAME}${{ matrix.ext }}"
|
||||
"zig-out/bin/${BINARY_NAME}${{ matrix.ext }}"
|
||||
|
||||
- name: Upload release asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
|
||||
Reference in New Issue
Block a user