]> git.puffer.fish Git - matthieu/nova.git/commitdiff
Create bazel-build.yml
authorMatthieu <20992787+MatthieuCoder@users.noreply.github.com>
Fri, 3 Sep 2021 23:35:38 +0000 (03:35 +0400)
committerGitHub <noreply@github.com>
Fri, 3 Sep 2021 23:35:38 +0000 (03:35 +0400)
.github/workflows/bazel-build.yml [new file with mode: 0644]

diff --git a/.github/workflows/bazel-build.yml b/.github/workflows/bazel-build.yml
new file mode 100644 (file)
index 0000000..91fa691
--- /dev/null
@@ -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*/**/*