Compare commits
9 Commits
aed00324f6
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 168c917e04 | |||
| 2cf4565fd1 | |||
| 8b2c3cff79 | |||
| a32f097bea | |||
| 91b3545702 | |||
| 1df9395324 | |||
| 1062787e18 | |||
| dfc2a0668c | |||
| 1cda4d05b3 |
@@ -1,45 +1,28 @@
|
|||||||
|
# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json
|
||||||
name: Build
|
name: Build
|
||||||
run-name: ${{ gitea.actor }} is building
|
run-name: ${{ gitea.actor }} is building
|
||||||
on: [push]
|
on: [push]
|
||||||
|
env:
|
||||||
|
ZIG_VERSION: 0.14.1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
fetch-tags: ''
|
fetch-tags: ''
|
||||||
- run: wget http://172.17.0.1:8081/repository/ziglang.org/download/0.14.1/zig-x86_64-linux-0.14.1.tar.xz
|
- run: wget http://172.17.0.1:8081/repository/ziglang.org/download/$ZIG_VERSION/zig-x86_64-linux-${ZIG_VERSION}.tar.xz
|
||||||
- run: tar xfv zig-x86_64-linux-0.14.1.tar.xz
|
- run: tar xfv zig-x86_64-linux-$ZIG_VERSION.tar.xz
|
||||||
- run: ./zig-x86_64-linux-0.14.1/zig build -Doptimize=ReleaseSmall -Dtarget=x86_64-linux-musl
|
- run: ./zig-x86_64-linux-$ZIG_VERSION/zig build -Doptimize=ReleaseSmall -Dtarget=x86_64-linux-musl -Dexe_name=zig-totp-x86_64-linux-musl
|
||||||
- run: ./zig-x86_64-linux-0.14.1/zig build -Doptimize=ReleaseSmall -Dtarget=x86_64-windows
|
- run: ./zig-x86_64-linux-$ZIG_VERSION/zig build -Doptimize=ReleaseSmall -Dtarget=x86_64-linux-gnu -Dexe_name=zig-totp-x86_64-linux-gnu
|
||||||
|
- run: ./zig-x86_64-linux-$ZIG_VERSION/zig build -Doptimize=ReleaseSmall -Dtarget=x86_64-windows -Dexe_name=zig-totp
|
||||||
|
|
||||||
release:
|
|
||||||
name: ${{ matrix.target }}
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- target: x86_64-linux-musl
|
|
||||||
- target: x86_64-linux-gnu
|
|
||||||
- target: x86_64-windows
|
|
||||||
steps:
|
|
||||||
- run: printenv
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
fetch-tags: ''
|
|
||||||
- run: wget http://172.17.0.1:8081/repository/ziglang.org/download/0.14.1/zig-x86_64-linux-0.14.1.tar.xz
|
|
||||||
- run: tar xfv zig-x86_64-linux-0.14.1.tar.xz
|
|
||||||
- run: ./zig-x86_64-linux-0.14.1/zig build -Doptimize=ReleaseSmall -Dtarget=${{ matrix.target }} -Dexe_name=zig-totp-$GITHUB_REF_NAME-${{ matrix.target }}
|
|
||||||
- name: upload artifacts
|
- name: upload artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: zig-totp-${{matrix.target }}
|
name: zig-totp
|
||||||
path: zig-out/bin/
|
path: zig-out/bin/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
9
build.sh
Executable file
9
build.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
find src | entr -c sh -c 'echo "\n\n\n\n" ; zig build test 2>&1 | cat; echo "\n\n\n" ; date'
|
||||||
|
|
||||||
|
# build exe for windows
|
||||||
|
# doesn't work anymore, because I added the version number as module "config" to the
|
||||||
|
# root_module. In main,zig we import the module. This only works when building
|
||||||
|
# using the build.zig file, but not when building without a build file.
|
||||||
|
#zig build-exe src/main.zig -O ReleaseSmall -fstrip -fsingle-threaded -target x86_64-windows
|
||||||
|
|
||||||
|
zig build && ./zig-out/bin/zig-totp list
|
||||||
Reference in New Issue
Block a user