From acda4e239adec447fe6fdf6504bf08cca5c7957b Mon Sep 17 00:00:00 2001 From: Matthieu <20992787+MatthieuCoder@users.noreply.github.com> Date: Sat, 4 Sep 2021 03:35:38 +0400 Subject: [PATCH] Create bazel-build.yml --- .github/workflows/bazel-build.yml | 49 +++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/bazel-build.yml diff --git a/.github/workflows/bazel-build.yml b/.github/workflows/bazel-build.yml new file mode 100644 index 0000000..91fa691 --- /dev/null +++ b/.github/workflows/bazel-build.yml @@ -0,0 +1,49 @@ +# This is a basic workflow to help you get started with Actions + +name: Build + +# Controls when the workflow will run +on: + push: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + # The type of runner that the job will run on + runs-on: ${{ matrix.os }} + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + - name: Setup Bazelisk + # You may pin to the exact commit or the version. + # uses: bazelbuild/setup-bazelisk@2351cf5a7584ce72638fbce7c22e5128a5fcd5b2 + uses: bazelbuild/setup-bazelisk@v1.0.1 + with: + # The Bazelisk version to download (if necessary) and use. Supports semver spec and ranges. + bazelisk-version: 1.x # optional, default is 1.x + # Used to query bazelisk releases. Since there's a default, this is typically not supplied by the user. + token: ${{ github.token }} + # Runs a single command using the runners shell + - name: Mount bazel cache # Optional + uses: actions/cache@v2 + with: + path: "~/.cache/bazel" + key: bazel-${{ matrix.os }} + # Runs a set of commands using the runners shell + - name: Execute build script + shell: bash + run: | + bazel build //:package + + - name: Bazel artifacts + uses: actions/upload-artifact@v2 + with: + name: all-${{ matrix.os }} + path: bazel-bin*/**/* -- 2.39.5