Reorganize repo for better DX and linux builds (#28) #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
push: | |
branches: [ main, bazel-setup ] | |
paths-ignore: | |
- 'projs/docs/**' | |
- 'specs/**' | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Install bazelisk | |
run: | | |
choco install bazelisk | |
- name: Add msbuild to PATH | |
uses: microsoft/[email protected] | |
- name: Build | |
run: | | |
bazel build //... | |
- name: use cache | |
uses: actions/cache@v2 | |
with: | |
path: "./bazel-bin/projs" | |
key: ${{ runner.os }}-${{ github.run_id }} | |
- 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 | |
path: './bazel-bin/projs/shadow-engine/**/*' | |
test-sff: | |
runs-on: windows-latest | |
needs: build | |
permissions: | |
contents: read | |
issues: read | |
checks: write | |
pull-requests: write | |
steps: | |
- name: use cache | |
uses: actions/cache@v2 | |
with: | |
path: "./bazel-bin/projs" | |
key: ${{ runner.os }}-${{ github.run_id }} | |
- name: Make output folder | |
run: mkdir ./test-results | |
- name: Test shadow-file-format | |
run: ./bazel-bin/projs/shadow-file-format/test.exe -r junit -o ./test-results/shadow-file-format-test.xml | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action/composite@v1 | |
if: always() | |
with: | |
files: "test-results/**/*.xml" | |