From dc9b8b58e941525e5fa108308a70d7ffb5bc99b0 Mon Sep 17 00:00:00 2001 From: "R. Yao" Date: Thu, 25 Jan 2024 02:00:24 -0800 Subject: [PATCH] Build test on linux, macos and windows --- .github/workflows/actions-build-test.yml | 49 ++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/.github/workflows/actions-build-test.yml b/.github/workflows/actions-build-test.yml index 8254d25..6ffb5e2 100644 --- a/.github/workflows/actions-build-test.yml +++ b/.github/workflows/actions-build-test.yml @@ -2,7 +2,7 @@ name: Build checks run-name: ${{ github.actor }} Build test on: [push] jobs: - Build-Test: + Build-Test-Linux: runs-on: ubuntu-latest steps: - run: echo "The job was automatically triggered by a ${{ github.event_name }} event." @@ -18,8 +18,51 @@ jobs: - name: Mount bazel cache # Optional uses: actions/cache@v3 with: - path: "~/.cache/bazel" - key: bazel + path: "~/.cache/bazel_debian" + key: bazel_debian - run: bazel build //... - run: bazel test //... - run: echo "This job's status is ${{ job.status }}." + Build-Test-MacOs: + runs-on: macos-latest + steps: + - run: echo "The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "This job is now running on a ${{ runner.os }} server." + - run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - name: Mount bazel cache # Optional + uses: actions/cache@v3 + with: + path: "~/.cache/bazel_macos" + key: bazel_macos + - run: bazel build //... + - run: bazel test //... + - run: echo "This job's status is ${{ job.status }}." + Build-Test-Windows: + runs-on: windows-latest + steps: + - run: echo "The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "This job is now running on a ${{ runner.os }} server." + - run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - name: Mount bazel cache # Optional + uses: actions/cache@v3 + with: + path: "~/.cache/bazel_win" + key: bazel_win + - run: bazel build //... + - run: bazel test //... + - run: echo "This job's status is ${{ job.status }}." + \ No newline at end of file