CI: rework make script matrix job #25
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: Megaboom build tests | |
on: | |
workflow_dispatch: | |
push: | |
pull_request: | |
jobs: | |
build-stage-target: | |
name: Build sample stage targets | |
runs-on: ubuntu-22.04 | |
container: | |
image: ghcr.io/antmicro/megaboom:latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
TARGET: ["tag_array_64x184_generate_abstract"] | |
env: | |
DEBIAN_FRONTEND: "noninteractive" | |
steps: | |
# Workaround for https://github.com/actions/runner/issues/863 | |
- name: Workaround overriden HOME env var | |
shell: bash | |
run: | | |
echo HOME=/root | sudo tee -a $GITHUB_ENV | |
- name: pre checkout info | |
run: | | |
whoami | |
pwd | |
ls -la | |
echo $HOME | |
- name: Checkout Megaboom | |
uses: actions/checkout@v4 | |
with: | |
path: megaboom | |
- name: Clone bazel-orfs | |
uses: actions/checkout@v4 | |
with: | |
repository: antmicro/bazel-orfs | |
path: bazel-orfs | |
- name: post checkout info | |
run: | | |
whoami | |
pwd | |
ls -la | |
echo $HOME | |
- name: query target | |
run: | | |
bazel query ${{ matrix.TARGET }} | |
bazel query ${{ matrix.TARGET }} --output=build | |
working-directory: megaboom | |
- name: build target | |
run: | | |
echo $HOME | |
bazel build --subcommands --verbose_failures --sandbox_debug ${{ matrix.TARGET }} | |
working-directory: megaboom | |
test-make-script-target: | |
name: Execute sample _make scripts | |
runs-on: ubuntu-22.04 | |
container: | |
image: ghcr.io/antmicro/megaboom:latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
STAGE_TARGET: ["L1MetadataArray_test_floorplan_make"] | |
ORFS_MAKE_TARGET: ["do-floorplan"] | |
env: | |
DEBIAN_FRONTEND: "noninteractive" | |
steps: | |
# Workaround for https://github.com/actions/runner/issues/863 | |
- name: Workaround overriden HOME env var | |
shell: bash | |
run: | | |
echo HOME=/root | sudo tee -a $GITHUB_ENV | |
- name: pre checkout info | |
run: | | |
whoami | |
pwd | |
ls -la | |
- name: Checkout Megaboom | |
uses: actions/checkout@v4 | |
with: | |
path: megaboom | |
- name: Clone bazel-orfs | |
uses: actions/checkout@v4 | |
with: | |
repository: antmicro/bazel-orfs | |
path: bazel-orfs | |
- name: post checkout info | |
run: | | |
whoami | |
pwd | |
ls -la | |
- name: query stage target | |
run: | | |
bazel query ${{ matrix.STAGE_TARGET }} | |
bazel query ${{ matrix.STAGE_TARGET }} --output=build | |
working-directory: megaboom | |
- name: query make script target | |
run: | | |
bazel query ${{ matrix.STAGE_TARGET }}_make | |
bazel query ${{ matrix.STAGE_TARGET }}_make --output=build | |
working-directory: megaboom | |
- name: build make script | |
run: | | |
echo $HOME | |
bazel build --subcommands --verbose_failures --sandbox_debug ${{ matrix.STAGE_TARGET }} | |
working-directory: megaboom | |
- name: build stage target dependencies | |
run: | | |
bazel build $(bazel query "deps(${{ matrix.STAGE_TARGET }}) except ${{ matrix.STAGE_TARGET }}") | |
working-directory: megaboom | |
- name: run make script | |
run: | | |
./bazel-bin/${{ matrix.STAGE_TARGET }}_make ${{ matrix.ORFS_MAKE_TARGET }} | |
working-directory: megaboom |