diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml new file mode 100644 index 0000000..f8a9949 --- /dev/null +++ b/.github/workflows/presubmit.yml @@ -0,0 +1,50 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: SHELL-Encryption + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: + labels: ubuntu-24.04-64core + steps: + - name: Check out repository code + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # pin@v3 + + - name: Cache bazel build artifacts + uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # pin@v4.2.0 + with: + path: | + ~/.cache/bazel + key: ${{ runner.os }}-${{ hashFiles('.bazelrc', 'MODULE.bazel.lock') }}-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-${{ hashFiles('.bazelrc', 'MODULE.bazel.lock') }}- + + - name: "Run `bazel build`" + run: | + bazel build -c opt //... + + - name: "Run `bazel test`" + run: | + bazel test -c opt //...