From 9082bdd07a15a1b39944bb4e3feac5cf726cfab8 Mon Sep 17 00:00:00 2001 From: xinyangli Date: Mon, 25 Mar 2024 20:46:13 +0800 Subject: [PATCH] ci: init --- .gitea/workflows/abstract-machine-build.yml | 16 ++++++++++++++++ flake.nix | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/abstract-machine-build.yml diff --git a/.gitea/workflows/abstract-machine-build.yml b/.gitea/workflows/abstract-machine-build.yml new file mode 100644 index 0000000..5f53bca --- /dev/null +++ b/.gitea/workflows/abstract-machine-build.yml @@ -0,0 +1,16 @@ +name: Build abstract machine with nix +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + sparse-checkout: | + flake.nix + abstract-machine + - uses: https://github.com/DeterminateSystems/nix-installer-action@main + - name: Build with nix + run: | + nix build -L .#abstract-machine + diff --git a/flake.nix b/flake.nix index 42dccac..3a07d79 100644 --- a/flake.nix +++ b/flake.nix @@ -20,10 +20,10 @@ }; in { - packages.nemu = pkgs.callPackage ./nemu { am-kernels = self.packages.${system}.am-kernels-cmake; }; + packages.nemu = pkgs.callPackage ./nemu { am-kernels = self.packages.${system}.am-kernels; }; packages.abstract-machine = crossPkgs.callPackage ./abstract-machine { isa = "riscv"; platform = "nemu"; }; - packages.am-kernels-cmake = crossPkgs.stdenv.mkDerivation rec { + packages.am-kernels = crossPkgs.stdenv.mkDerivation rec { pname = "am-kernels-cmake"; version = "2024.02.18";