Add building a regression test image on master.

This commit is contained in:
Ashton Snelgrove 2021-01-13 16:38:13 -07:00
parent 4efa5b98e8
commit 2b705ba17a
3 changed files with 61 additions and 4 deletions

View File

@ -1,11 +1,16 @@
name: linux_build
# Run CI on
# - each push
# - each pull request
# - scheduled weekly
# - each push if no code has changed
on:
push:
paths:
- '**.c'
- '**.cc'
- '**.c\+\+'
- '**.cpp'
- '**.h'
- '**.hh'
pull_request:
schedule:
- cron: '0 0 * * 0 ' # weekly
@ -137,6 +142,7 @@ jobs:
yosys/yosys-smtbmc
docker_distribution:
name: Build docker image for distribution
if: ${{ github.ref == 'refs/heads/master'}}
runs-on: ubuntu-latest
needs: linux_build
steps:
@ -156,13 +162,20 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Build and push
- name: Build and push runtime image
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/Dockerfile.run
push: true
tags: ghcr.io/lnis-uofu/openfpga-run:latest
- name: Build and push test image
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/Dockerfile.test
push: true
tags: ghcr.io/lnis-uofu/openfpga-regression-tests:latest
regression_tests:
name: Regression tests
runs-on: ubuntu-18.04

39
.github/workflows/regression.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: regression_tests
# Run regressions on each push if no code has changed
on:
push:
paths-ignore:
- '**.c'
- '**.cc'
- '**.c\+\+'
- '**.cpp'
- '**.h'
- '**.hh'
# Multiple job to tests
jobs:
regression_tests:
name: Regression tests
runs-on: ubuntu-18.04
container: ghcr.io/lnis-uofu/openfpga-regression-tests:latest
strategy:
fail-fast: false
matrix:
config:
- name: "Basic Regression Tests: GCC-8 (Ubuntu 18.04)"
script: basic_reg_test.sh
- name: "FPGA-Verilog Regression Tests: GCC-8 (Ubuntu 18.04)"
script: fpga_verilog_reg_test.sh
- name: "FPGA-Bitstream Regression Tests: GCC-8 (Ubuntu 18.04)"
script: fpga_bitstream_reg_test.sh
- name: "FPGA-SDC Regression Tests: GCC-8 (Ubuntu 18.04)"
script: fpga_sdc_reg_test.sh
- name: "FPGA-SPICE Regression Tests: GCC-8 (Ubuntu 18.04)"
script: fpga_spice_reg_test.sh
steps:
- name: Checkout OpenFPGA repo
uses: actions/checkout@v2
- name: ${{matrix.config.name}}
shell: bash
run: source .github/workflows/${{matrix.config.script}}

View File

@ -0,0 +1,5 @@
FROM ghcr.io/lnis-uofu/openfpga-buildenv-test:latest
RUN mkdir /opt/openfpga
COPY abc/abc ace2/ace openfpga/openfpga vpr/vpr yosys/yosys yosys/yosys-abc yosys/yosys-config yosys/yosys-filterlib yosys/yosys-smtbmc /opt/openfpga/
RUN cd /opt/openfpga && chmod +x abc ace openfpga vpr yosys yosys-abc yosys-config yosys-filterlib yosys-smtbmc
ENV PATH="/opt/openfpga:${PATH}"