Compare commits

...

12 Commits

Author SHA1 Message Date
4ff826d9f4 fetch complete repo
Some checks failed
Build / build (push) Failing after 1m10s
2025-07-28 19:03:08 +02:00
769573a23b try to upload artifacts
Some checks failed
Build / build (push) Failing after 32s
2025-07-28 18:55:50 +02:00
d5632dea6e fetch tags
All checks were successful
Build / build (push) Successful in 22s
2025-07-28 18:49:40 +02:00
83efe0547e cross compile for windows and linux
All checks were successful
Build / build (push) Successful in 23s
2025-07-28 18:46:41 +02:00
761d9086cd moving the zig binary doesn't work
Some checks failed
Build / build (push) Failing after 21s
2025-07-27 17:58:24 +02:00
2214ae92d1 I am so stupid
Some checks failed
Build / build (push) Failing after 8s
2025-07-27 17:56:39 +02:00
a0147b8216 host.docker.internal doesn't work, try magic ip instead
Some checks failed
Build / build (push) Failing after 8s
2025-07-27 17:55:40 +02:00
e1d195f236 brainfart
Some checks failed
Build / build (push) Failing after 5s
2025-07-27 17:54:53 +02:00
0fbea3d981 cannot use localhost in a container, obviously
Some checks failed
Build / build (push) Failing after 5s
2025-07-27 17:51:51 +02:00
25e2c10bb2 ubuntu slim does not have wget or curl
Some checks failed
Build / build (push) Failing after 5s
2025-07-27 17:50:33 +02:00
a296b509ae typo in name for checkout action
Some checks failed
Build / build (push) Failing after 13s
2025-07-27 17:46:56 +02:00
8b946e3423 1st try of a build workflow
Some checks failed
Build / build (push) Failing after 19s
2025-07-27 17:45:03 +02:00
2 changed files with 26 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
name: Build
run-name: ${{ gitea.actor }} is building
on: [push]
jobs:
build:
runs-on: ubuntu-latest
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
- run: ./zig-x86_64-linux-0.14.1/zig build -Doptimize=ReleaseSmall -Dtarget=x86_64-windows

View File

@@ -22,8 +22,10 @@ pub fn build(b: *std.Build) void {
// set a preferred release mode, allowing the user to decide how to optimize.
const optimize = b.standardOptimizeOption(.{});
const exe_name = b.option([]const u8, "exe_name", "Name of the executable") orelse "zig-totp";
const lib = b.addStaticLibrary(.{
.name = "zig-totp",
.name = exe_name,
// In this case the main source file is merely a path, however, in more
// complicated build scripts, this could be a generated file.
.root_source_file = b.path("src/root.zig"),
@@ -37,7 +39,7 @@ pub fn build(b: *std.Build) void {
b.installArtifact(lib);
const exe = b.addExecutable(.{
.name = "zig-totp",
.name = exe_name,
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,