Compare commits

..

No commits in common. "e74a0e9456327a8dd5a62ec3245cf30f7b5c2c15" and "a3117eea54f9ae30c4126e0e9408816cde9d3efc" have entirely different histories.

6 changed files with 9 additions and 36 deletions

View File

@ -32,7 +32,7 @@ jobs:
tar x -C /usr/local -f zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz tar x -C /usr/local -f zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz
ln -s /usr/local/zig-linux-${ARCH}-${ZIG_VERSION}/zig /usr/local/bin/zig ln -s /usr/local/zig-linux-${ARCH}-${ZIG_VERSION}/zig /usr/local/bin/zig
- name: Run tests - name: Run tests
run: zig build test --verbose run: zig build -j1 test --verbose
- name: Build example - name: Build example
run: ( cd example && zig build ) # Make sure example builds run: ( cd example && zig build ) # Make sure example builds
# Zig package manager expects everything to be inside a directory in the archive, # Zig package manager expects everything to be inside a directory in the archive,

View File

@ -35,7 +35,7 @@ jobs:
ln -s /usr/local/"${file%%.tar.xz}"/zig /usr/local/bin/zig ln -s /usr/local/"${file%%.tar.xz}"/zig /usr/local/bin/zig
zig version zig version
- name: Run tests - name: Run tests
run: zig build test --verbose run: zig build -j1 test --verbose
- name: Build example - name: Build example
run: ( cd example && zig build ) # Make sure example builds run: ( cd example && zig build ) # Make sure example builds
# Zig package manager expects everything to be inside a directory in the archive, # Zig package manager expects everything to be inside a directory in the archive,

View File

@ -33,7 +33,7 @@ jobs:
ln -s /usr/local/"${file%%.tar.xz}"/zig /usr/local/bin/zig ln -s /usr/local/"${file%%.tar.xz}"/zig /usr/local/bin/zig
zig version zig version
- name: Run tests - name: Run tests
run: zig build test --verbose run: zig build -j1 test --verbose
- name: Build example - name: Build example
run: ( cd example && zig build ) # Make sure example builds run: ( cd example && zig build ) # Make sure example builds
# Zig package manager expects everything to be inside a directory in the archive, # Zig package manager expects everything to be inside a directory in the archive,

View File

@ -17,19 +17,15 @@ Current executable size for the demo is 980k after compiling with -Doptimize=Rel
in x86_linux, and will vary based on services used. Tested targets: in x86_linux, and will vary based on services used. Tested targets:
* x86_64-linux * x86_64-linux
* riscv64-linux\* * riscv64-linux
* aarch64-linux * aarch64-linux
* x86_64-windows\*\* * x86_64-windows
* arm-linux * arm-linux
* aarch64-macos * aarch64-macos
* x86_64-macos * x86_64-macos
Tested targets are built, but not continuously tested, by CI. Tested targets are built, but not continuously tested, by CI.
\* On Zig 0.12, riscv64-linux tests get stuck forever in "LLVM Emit object"
\*\* On Zig 0.12, x86_64-windows tests have one test skipped as LLVM consumes all available RAM on the system
Zig-Develop Branch Zig-Develop Branch
------------------ ------------------

View File

@ -14,12 +14,10 @@ const test_targets = [_]std.zig.CrossTarget{
.cpu_arch = .aarch64, .cpu_arch = .aarch64,
.os_tag = .linux, .os_tag = .linux,
}, },
// // The test executable just spins forever in LLVM using nominated zig 0.12 March 2024 .{
// // This is likely a LLVM problem unlikely to be fixed in zig 0.12 .cpu_arch = .riscv64,
// .{ .os_tag = .linux,
// .cpu_arch = .riscv64, },
// .os_tag = .linux,
// },
.{ .{
.cpu_arch = .arm, .cpu_arch = .arm,
.os_tag = .linux, .os_tag = .linux,
@ -173,20 +171,6 @@ pub fn build(b: *Builder) !void {
// running the unit tests. // running the unit tests.
const test_step = b.step("test", "Run unit tests"); const test_step = b.step("test", "Run unit tests");
// // Creates a step for unit testing. This only builds the test executable
// // but does not run it.
// const unit_tests = b.addTest(.{
// .root_source_file = .{ .path = "src/aws.zig" },
// .target = target,
// .optimize = optimize,
// });
// unit_tests.root_module.addImport("smithy", smithy_dep.module("smithy"));
// unit_tests.step.dependOn(gen_step);
//
// const run_unit_tests = b.addRunArtifact(unit_tests);
// run_unit_tests.skip_foreign_checks = true;
// test_step.dependOn(&run_unit_tests.step);
for (test_targets) |t| { for (test_targets) |t| {
// 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.

View File

@ -1,4 +1,3 @@
const builtin = @import("builtin");
const std = @import("std"); const std = @import("std");
const awshttp = @import("aws_http.zig"); const awshttp = @import("aws_http.zig");
@ -1899,13 +1898,7 @@ test "ec2_query_no_input: EC2 describe regions" {
try std.testing.expectEqualStrings("4cdbdd69-800c-49b5-8474-ae4c17709782", call.response_metadata.request_id); try std.testing.expectEqualStrings("4cdbdd69-800c-49b5-8474-ae4c17709782", call.response_metadata.request_id);
try std.testing.expectEqual(@as(usize, 17), call.response.regions.?.len); try std.testing.expectEqual(@as(usize, 17), call.response.regions.?.len);
} }
// LLVM hates this test. Depending on the platform, it will consume all memory
// on the compilation host. Windows x86_64 and Linux riscv64 seem to be a problem so far
// riscv64-linux also seems to have another problem with LLVM basically infinitely
// doing something. My guess is the @embedFile is freaking out LLVM
test "ec2_query_with_input: EC2 describe instances" { test "ec2_query_with_input: EC2 describe instances" {
if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .windows) return error.SkipZigTest;
if (builtin.cpu.arch == .riscv64 and builtin.os.tag == .linux) return error.SkipZigTest;
const allocator = std.testing.allocator; const allocator = std.testing.allocator;
var test_harness = TestSetup.init(.{ var test_harness = TestSetup.init(.{
.allocator = allocator, .allocator = allocator,