2022-06-10 11:51:58 +00:00
|
|
|
name: Build and Test
|
2022-06-09 20:39:54 +00:00
|
|
|
|
2022-06-10 11:51:58 +00:00
|
|
|
on:
|
|
|
|
push:
|
2022-06-24 10:38:50 +00:00
|
|
|
branches: [ main, bazel-setup ]
|
2022-06-10 11:51:58 +00:00
|
|
|
paths-ignore:
|
2022-06-13 11:37:18 +00:00
|
|
|
- 'projs/docs/**'
|
2022-06-10 11:51:58 +00:00
|
|
|
- 'specs/**'
|
2022-06-09 20:39:54 +00:00
|
|
|
|
|
|
|
jobs:
|
2022-06-09 20:57:56 +00:00
|
|
|
build:
|
2022-06-09 20:39:54 +00:00
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-06-09 21:04:55 +00:00
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-06-09 20:39:54 +00:00
|
|
|
|
|
|
|
|
2022-06-18 15:03:30 +00:00
|
|
|
- name: Install bazelisk
|
|
|
|
run: |
|
|
|
|
choco install bazelisk
|
2022-06-09 20:39:54 +00:00
|
|
|
|
2022-06-18 15:03:30 +00:00
|
|
|
- name: Add msbuild to PATH
|
|
|
|
uses: microsoft/setup-msbuild@v1.1
|
2022-06-09 20:39:54 +00:00
|
|
|
|
2022-06-18 15:03:30 +00:00
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
bazel build //...
|
2022-06-10 11:51:58 +00:00
|
|
|
|
|
|
|
- name: use cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2022-06-18 15:03:30 +00:00
|
|
|
path: "./bazel-bin/projs"
|
2022-06-10 12:19:27 +00:00
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}
|
2022-06-10 11:51:58 +00:00
|
|
|
|
|
|
|
- name: Upload shadow-engine artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ needs.update.outputs.old_version_name }}-${{ needs.update.outputs.new_version_name }}-patch
|
2022-06-18 15:03:30 +00:00
|
|
|
path: './bazel-bin/projs/shadow-engine/**/*'
|
2022-06-10 11:51:58 +00:00
|
|
|
|
|
|
|
test-sff:
|
|
|
|
runs-on: windows-latest
|
2022-06-10 11:54:07 +00:00
|
|
|
needs: build
|
2022-06-10 13:25:04 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
issues: read
|
|
|
|
checks: write
|
|
|
|
pull-requests: write
|
2022-06-10 11:51:58 +00:00
|
|
|
steps:
|
|
|
|
- name: use cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
2022-06-18 15:03:30 +00:00
|
|
|
path: "./bazel-bin/projs"
|
2022-06-10 12:19:27 +00:00
|
|
|
key: ${{ runner.os }}-${{ github.run_id }}
|
2022-06-24 10:16:55 +00:00
|
|
|
|
|
|
|
- name: Make output folder
|
|
|
|
run: mkdir ./test-results
|
|
|
|
|
2023-03-10 15:54:29 +00:00
|
|
|
- name: Test shadow-assets
|
|
|
|
run: ./bazel-bin/projs/shadow-assets/test.exe -r junit -o ./test-results/shadow-assets-test.xml
|
2022-06-10 11:51:58 +00:00
|
|
|
|
2022-06-10 13:12:23 +00:00
|
|
|
- name: Publish Test Results
|
|
|
|
uses: EnricoMi/publish-unit-test-result-action/composite@v1
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
files: "test-results/**/*.xml"
|
|
|
|
|