From d2f25fa22cf96b665dc3dd08f60b5e86e3ed750c Mon Sep 17 00:00:00 2001 From: Meng Zhuo Date: Fri, 20 Dec 2024 15:36:59 +0800 Subject: [PATCH 1/2] init support from Github action --- .github/workflows/build_and_test.yaml | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build_and_test.yaml diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml new file mode 100644 index 0000000..d1f71b4 --- /dev/null +++ b/.github/workflows/build_and_test.yaml @@ -0,0 +1,31 @@ +name: Build and Test + +on: + - push + - pull_request + +permissions: read-all + +jobs: + build: + strategy: + matrix: + os: + - ubuntu-latest + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout tree + uses: actions/checkout@v4 + + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v3 + with: + ocaml-compiler: 4.14.2 + + - run: opam install . --deps-only --with-test + + - run: opam exec -- dune build + + - run: opam exec -- dune runtest From 3b728ba6d487806c1b488df60559e66bc5f550d2 Mon Sep 17 00:00:00 2001 From: Meng Zhuo Date: Fri, 20 Dec 2024 15:53:35 +0800 Subject: [PATCH 2/2] fix moonc binary not checked --- .github/workflows/build_and_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml index d1f71b4..a289016 100644 --- a/.github/workflows/build_and_test.yaml +++ b/.github/workflows/build_and_test.yaml @@ -26,6 +26,6 @@ jobs: - run: opam install . --deps-only --with-test - - run: opam exec -- dune build + - run: opam exec -- dune build -p moonbit-lang - - run: opam exec -- dune runtest + - run: ./_build/install/default/bin/moonc -v