From 27dfede802a6479b77e0a222ae63ee5692980f45 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Tue, 5 Sep 2023 13:00:40 -0700 Subject: [PATCH] add actions runtime token/url to environment --- .gitea/workflows/build.yaml | 3 +++ build.zig | 13 ++----------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 609fe96..5b2518a 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,6 +1,9 @@ name: AWS-Zig Build run-name: ${{ github.actor }} building AWS Zig SDK on: [push] +env: + ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ACTIONS_RUNTIME_URL: ${{ github.server_url }}/api/actions_pipeline/ jobs: build-zig-0.11.0-amd64-host: runs-on: ubuntu-latest diff --git a/build.zig b/build.zig index 02afe4a..8069dd0 100644 --- a/build.zig +++ b/build.zig @@ -29,6 +29,8 @@ pub fn build(b: *Builder) !void { // to use, but that should be easy. It may also give some ideas on the // code gen piece itself, though it might be nice to leave as a seperate // executable + // TODO: This executable should not be built when importing as a package. + // It relies on code gen and is all fouled up when getting imported const exe = b.addExecutable(.{ .name = "demo", .root_source_file = .{ .path = "src/main.zig" }, @@ -105,7 +107,6 @@ pub fn build(b: *Builder) !void { b.allocator, &[_][]const u8{ b.global_cache_root.path.?, models_dir }, )); - // cg_cmd.addDirectoryArg(std.Build.FileSource.relative("codegen/models")); cg_cmd.addArg("--output"); cg_cmd.addDirectoryArg(std.Build.FileSource.relative("src/models")); if (b.verbose) @@ -124,16 +125,6 @@ pub fn build(b: *Builder) !void { // file, generator exe hash. Each import has comment // with both input and output hash and we can decide // later about warning on manual changes... - // - // this scheme would permit cross plat codegen and maybe - // we can have codegen added in a seperate repo, - // though not sure how necessary that is - // cg.dependOn(&b.addSystemCommand(&.{ - // b.zig_exe, - // "build", - // "run", - // "-Doptimize=ReleaseSafe", - // }).step); cg.dependOn(&cg_cmd.step); exe.step.dependOn(cg);