upgrade to zig 0.13.0
This commit is contained in:
		
							parent
							
								
									48c0e893da
								
							
						
					
					
						commit
						4b649eb445
					
				
					 3 changed files with 12 additions and 14 deletions
				
			
		|  | @ -2,9 +2,8 @@ name: Build | ||||||
| run-name: Standard build, creates docker image and deploys on success | run-name: Standard build, creates docker image and deploys on success | ||||||
| on: [push] | on: [push] | ||||||
| env: | env: | ||||||
|   ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }} |   # ACTIONS_RUNTIME_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
|   ACTIONS_RUNTIME_URL: https://git.lerch.org/api/actions_pipeline/ |   # ACTIONS_RUNTIME_URL: https://git.lerch.org/api/actions_pipeline/ | ||||||
|   ZIG_URL: https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz |  | ||||||
|   BUILD_TARGET: x86_64-linux-gnu  # Needs to be gnu since we're using dlopen |   BUILD_TARGET: x86_64-linux-gnu  # Needs to be gnu since we're using dlopen | ||||||
|   BUILD_OPTIMIZATION: ReleaseSafe # Safety is usually a good thing |   BUILD_OPTIMIZATION: ReleaseSafe # Safety is usually a good thing | ||||||
| jobs: | jobs: | ||||||
|  | @ -14,11 +13,10 @@ jobs: | ||||||
|       - run: echo "Triggered by ${{ github.event_name }} event" |       - run: echo "Triggered by ${{ github.event_name }} event" | ||||||
|       - name: Check out repository code |       - name: Check out repository code | ||||||
|         uses: actions/checkout@v3 |         uses: actions/checkout@v3 | ||||||
|       - name: Install zig |       - uses: elerch/setup-zig@v3 | ||||||
|         run: | |         with: | ||||||
|           curl -s "$ZIG_URL" |tar -xJ -C /usr/local \ |           version: 0.13.0 | ||||||
|           && ln -s /usr/local/zig*/zig /usr/local/bin \ |       - uses: elerch/zig-action-cache@v1.1.6 | ||||||
|           && true |  | ||||||
|       - name: Test |       - name: Test | ||||||
|         run: zig build test -Dtarget="$BUILD_TARGET" |         run: zig build test -Dtarget="$BUILD_TARGET" | ||||||
|       - name: Build |       - name: Build | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								build.zig
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								build.zig
									
										
									
									
									
								
							|  | @ -19,7 +19,7 @@ pub fn build(b: *std.Build) void { | ||||||
|         .name = "flexilib", |         .name = "flexilib", | ||||||
|         // In this case the main source file is merely a path, however, in more |         // In this case the main source file is merely a path, however, in more | ||||||
|         // complicated build scripts, this could be a generated file. |         // complicated build scripts, this could be a generated file. | ||||||
|         .root_source_file = .{ .path = "src/main.zig" }, |         .root_source_file = b.path("src/main.zig"), | ||||||
|         .target = target, |         .target = target, | ||||||
|         .optimize = optimize, |         .optimize = optimize, | ||||||
|     }); |     }); | ||||||
|  | @ -34,7 +34,7 @@ pub fn build(b: *std.Build) void { | ||||||
|         .name = "flexilib-sample-lib", |         .name = "flexilib-sample-lib", | ||||||
|         // In this case the main source file is merely a path, however, in more |         // In this case the main source file is merely a path, however, in more | ||||||
|         // complicated build scripts, this could be a generated file. |         // complicated build scripts, this could be a generated file. | ||||||
|         .root_source_file = .{ .path = "src/main-lib.zig" }, |         .root_source_file = b.path("src/main-lib.zig"), | ||||||
|         .target = target, |         .target = target, | ||||||
|         .optimize = optimize, |         .optimize = optimize, | ||||||
|     }); |     }); | ||||||
|  | @ -44,7 +44,7 @@ pub fn build(b: *std.Build) void { | ||||||
|         .name = "flexilib", |         .name = "flexilib", | ||||||
|         // In this case the main source file is merely a path, however, in more |         // In this case the main source file is merely a path, however, in more | ||||||
|         // complicated build scripts, this could be a generated file. |         // complicated build scripts, this could be a generated file. | ||||||
|         .root_source_file = .{ .path = "src/interface.zig" }, |         .root_source_file = b.path("src/interface.zig"), | ||||||
|         .target = target, |         .target = target, | ||||||
|         .optimize = optimize, |         .optimize = optimize, | ||||||
|     }); |     }); | ||||||
|  | @ -83,14 +83,14 @@ pub fn build(b: *std.Build) void { | ||||||
|     // Creates a step for unit testing. This only builds the test executable |     // Creates a step for unit testing. This only builds the test executable | ||||||
|     // but does not run it. |     // but does not run it. | ||||||
|     const main_tests = b.addTest(.{ |     const main_tests = b.addTest(.{ | ||||||
|         .root_source_file = .{ .path = "src/main.zig" }, |         .root_source_file = b.path("src/main.zig"), | ||||||
|         .target = target, |         .target = target, | ||||||
|         .optimize = optimize, |         .optimize = optimize, | ||||||
|     }); |     }); | ||||||
|     main_tests.linkLibC(); |     main_tests.linkLibC(); | ||||||
| 
 | 
 | ||||||
|     const lib_tests = b.addTest(.{ |     const lib_tests = b.addTest(.{ | ||||||
|         .root_source_file = .{ .path = "src/main-lib.zig" }, |         .root_source_file = b.path("src/main-lib.zig"), | ||||||
|         .target = target, |         .target = target, | ||||||
|         .optimize = optimize, |         .optimize = optimize, | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
|  | @ -397,7 +397,7 @@ pub fn main() !void { | ||||||
|         // panics. This is because arenas don't actually free memory until |         // panics. This is because arenas don't actually free memory until | ||||||
|         // they deinit. So we need to use the raw allocator here, but the |         // they deinit. So we need to use the raw allocator here, but the | ||||||
|         // arena can be used to store our arguments above |         // arena can be used to store our arguments above | ||||||
|         var cp = std.ChildProcess.init(al.items, raw_allocator); |         var cp = std.process.Child.init(al.items, raw_allocator); | ||||||
|         cp.stdin = stdin; |         cp.stdin = stdin; | ||||||
|         cp.stdout = stdout; |         cp.stdout = stdout; | ||||||
|         cp.stderr = stderr; |         cp.stderr = stderr; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue