Skip to content

Commit 3bcc5c8

Browse files
committed
Fix CI
1 parent 8f3e77c commit 3bcc5c8

File tree

4 files changed

+10
-41
lines changed

4 files changed

+10
-41
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,13 @@ on:
77
jobs:
88
build:
99
name: Build the kernel
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- run: mkdir build
14-
- uses: cachix/install-nix-action@v13
15-
with:
16-
install_url: https://nixos-nix-install-tests.cachix.org/serve/i6laym9jw3wg9mw6ncyrk6gjx4l34vvx/install
17-
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
18-
extra_nix_config: |
19-
experimental-features = nix-command flakes ca-references
20-
- uses: cachix/cachix-action@v10
12+
- uses: actions/checkout@v3
13+
- uses: cachix/install-nix-action@v20
14+
- uses: cachix/cachix-action@v12
2115
with:
2216
name: vmt
2317
extraPullNames: zig-nightly
2418
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
25-
- run: nix build .#vmt
19+
- run: nix build

flake.nix

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,20 @@
1818
vmtZig = zigpkgs."master";
1919
in
2020
{
21+
defaultPackage = self.outputs.packages.${system}.vmt;
2122
packages.vmt = pkgs.stdenv.mkDerivation {
2223
name = "vmt";
23-
nativeBuildInputs = [ vmtZig ];
24+
nativeBuildInputs = with pkgs; [ vmtZig grub2 xorriso ];
2425
src = self;
2526

2627
buildPhase = ''
2728
export HOME=$TMPDIR;
28-
zig build kernel
29-
'';
30-
31-
doCheck = true;
32-
checkPhase = ''
33-
zig test kernel/kernel.zig
29+
zig build iso
3430
'';
3531

3632
installPhase = ''
37-
cp -r ./build/x86_64/kernel $out
33+
mkdir -p $out
34+
cp -r ./build/kernel.iso $out/kernel.iso
3835
'';
3936

4037
};

kernel/kernel.zig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,3 @@ comptime {
3030
_ = arch.x86.multiboot;
3131
}
3232

33-
test {
34-
_ = mm;
35-
}

kernel/mm.zig

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -121,25 +121,6 @@ fn AddrWrapper(comptime name: []const u8, comptime T: type) type {
121121
};
122122
}
123123

124-
test "AddrWrapper" {
125-
const expect = std.testing.expect;
126-
127-
const Addr = AddrWrapper("TestAddr", u64);
128-
129-
const v1 = Addr.new(0x1000);
130-
const v2 = Addr.new(0x2000);
131-
132-
try expect(v1.add(0x1000).eq(v2));
133-
try expect(v2.sub(0x1000).eq(v1));
134-
135-
try expect(v1.le(v1));
136-
try expect(v2.eq(v2));
137-
138-
try expect(Addr.span(v1, v2) == 0x1000);
139-
140-
try expect(v1.max(v2).eq(v2));
141-
}
142-
143124
pub const VirtualAddress = AddrWrapper("VirtualAddress", arch.mm.VirtAddrType);
144125
pub const PhysicalAddress = AddrWrapper("PhysicalAddress", arch.mm.PhysAddrType);
145126

0 commit comments

Comments
 (0)