diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index f732856..45b9bd5 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,13 +1,38 @@ -on: [pull_request] +on: + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + - labeled jobs: - checks: + build-and-test: + name: "Build and Test" runs-on: ubuntu-latest - container: archlinux/archlinux:latest steps: + - uses: cachix/install-nix-action@v27 + with: + nix_path: nixpkgs=channel:nixos-unstable - name: Install dependencies - run: pacman -Syu --noconfirm make mill z3 - - uses: actions/checkout@v2 - - name: Check Format - run: make checkformat + run: nix-env -i mill verilator z3 -f '' + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Test run: make test + + check-format: + name: "Check Format" + runs-on: ubuntu-latest + steps: + - uses: cachix/install-nix-action@v27 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: Install dependencies + run: nix-env -i mill -f '' + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + - name: Test + run: make checkformat diff --git a/.gitignore b/.gitignore index a507599..a75eb83 100644 --- a/.gitignore +++ b/.gitignore @@ -10,11 +10,12 @@ !*.cc !.gitignore !.scalafmt.conf -!build.sc !README.md build/ # mill +!*.mill +!.mill-version out/ .bsp/ .idea/ diff --git a/.mill-version b/.mill-version new file mode 100644 index 0000000..e2e3067 --- /dev/null +++ b/.mill-version @@ -0,0 +1 @@ +0.12.7 diff --git a/build.sc b/build.mill similarity index 95% rename from build.sc rename to build.mill index 6a61ab7..38595ca 100644 --- a/build.sc +++ b/build.mill @@ -1,3 +1,5 @@ +package build + // import Mill dependency import mill._ import mill.define.Sources @@ -29,7 +31,7 @@ object playground extends ScalaModule with ScalafmtModule { m => ) } - def repositoriesTask = T.task { + def repositoriesTask = Task.Anon { Seq( coursier.MavenRepository("https://repo.scala-sbt.org/scalasbt/maven-releases"), coursier.MavenRepository("https://oss.sonatype.org/content/repositories/releases"),