From 368b5febcfc89ee0a0f7de6919abf64e5448d390 Mon Sep 17 00:00:00 2001 From: ClaytonKnittel <35512940+ClaytonKnittel@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:43:13 -0700 Subject: [PATCH] Github actions (#54) * gh actions * install clang-18 * move build -> test * change method of clang installation --- .github/workflows/format.yml | 26 ++++++++++++++++++++++++++ .github/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 .github/workflows/format.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 00000000..40aa639e --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,26 @@ +name: Format + +on: + push: + branches: + - ckmalloc + pull_request: +jobs: + check-format: + runs-on: ubuntu-latest + strategy: + matrix: + path: + - "src" + - "proto" + steps: + - name: Check out ckmalloc + uses: actions/checkout@v4 + with: + path: ckmalloc + submodules: recursive + - name: clang-format style check + uses: jidicula/clang-format-action@v4.13.0 + with: + clang-format-version: "17" + check-path: ${{ matrix.path }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..f554302b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,31 @@ +name: Test + +on: + push: + branches: + - ckmalloc + pull_request: +jobs: + check-build: + runs-on: ubuntu-latest + steps: + - name: Check out ckmalloc + uses: actions/checkout@v4 + with: + path: ckmalloc + submodules: recursive + - uses: bazelbuild/setup-bazelisk@v3 + - name: Mount bazel cache + uses: actions/cache@v4 + with: + path: "~/.cache/bazel" + key: bazel + - name: Install clang + run: | + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh 18 + - name: Test + working-directory: ckmalloc + run: | + bazel test --config=test //...