//go:build workflows package main var _ = (&Workflow{ Name: "Test", On: []any{"push"}, Jobs: Map[Job]{ {"hakurei", Job{ Name: "Hakurei", On: "nix", Steps: []Step{ checkout, newNixOSTest("hakurei"), newUploadArtifact("test output", "hakurei-vm-output"), }, }}, {"race", Job{ Name: "Hakurei (race detector)", On: "nix", Steps: []Step{ checkout, newNixOSTest("race"), newUploadArtifact("test output", "hakurei-race-vm-output"), }, }}, {"sandbox", Job{ Name: "Sandbox", On: "nix", Steps: []Step{ checkout, newNixOSTest("sandbox"), newUploadArtifact("test output", "sandbox-vm-output"), }, }}, {"sandbox-race", Job{ Name: "Sandbox (race detector)", On: "nix", Steps: []Step{ checkout, newNixOSTest("sandbox-race"), newUploadArtifact("test output", "sandbox-race-vm-output"), }, }}, {"sharefs", Job{ Name: "ShareFS", On: "rosa", Steps: []Step{ fixup, checkout, toolchain, newPackages(0, "fuse3", "fsmark"), newCIRequest("distribution", "dist -o result", "dist"), install, { Name: "Mount sharefs", Run: "useradd " + "-ru 1023 " + "-md /var/lib/sdcard " + "-k /var/empty " + "-s /sbin/nologin " + "media_rw && install -dm0 /sdcard && " + "sharefs " + "-o rw,noexec,nosuid,nodev,noatime," + "allow_other,mkdir,source=/var/lib/sdcard," + "setuid=1023,setgid=1023 /sdcard", }, newTestsuite("sharefs", "sharefs -V && "), newUploadArtifact("test output", "fs_mark"), }, }}, {"check", Job{ Name: "Flake checks", On: "nix", Needs: []string{ "hakurei", "race", "sandbox", "sandbox-race", }, Steps: []Step{ checkout, { Name: "Run checks", Run: "nix " + "--print-build-logs " + "--experimental-features 'nix-command flakes' " + "flake check ./test", }, }, }}, {"dist", Job{ Name: "Create distribution", On: "rosa", Steps: []Step{ fixup, checkout, newCIRequest("distribution", "dist -o result", "dist-test"), newUploadArtifact( "distribution", "hakurei-${{ steps.dist-test.outputs.rev }}", ), }, }}, }, }).mustWriteFile("test")