Update docker images, remove runtime/test split

This commit is contained in:
Ashton Snelgrove 2021-01-20 14:20:12 -07:00
parent 5f613c46f7
commit f956f28792
14 changed files with 42 additions and 46 deletions

View File

@ -1,11 +1,13 @@
name: linux_build
# Run CI on push, PR, and weekly.
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0 ' # weekly
workflow_dispatch:
# push:
# pull_request:
# schedule:
# - cron: '0 0 * * 0 ' # weekly
# Environment variables
env:
@ -29,8 +31,10 @@ jobs:
- name: Check for source code changes
id: changes
run: |
if ! git diff origin/master HEAD --name-status --exit-code -- . ':!openfpga_flow' ':!docs'; then
if git diff origin/master HEAD --name-status --exit-code -- . ':!openfpga_flow' ':!docs'; then
echo "::set-output name=status_code::$?"
else
echo "::set-output name=status_code::0"
fi
# Test the compilation compatibility
linux_build:
@ -38,7 +42,7 @@ jobs:
if: ${{needs.change_detect.outputs.source_modified || github.ref == 'refs/heads/master' }}
name: ${{ matrix.config.name }}
runs-on: ubuntu-18.04
container: ghcr.io/lnis-uofu/openfpga-buildenv-${{ matrix.config.cc}}
container: ghcr.io/lnis-uofu/openfpga-build-${{ matrix.config.cc}}
# Branch on different OS and settings
strategy:
fail-fast: false
@ -173,24 +177,17 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Build and push runtime image
- name: Build and push master image
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/Dockerfile.run
file: ./docker/Dockerfile.master
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
tags: ghcr.io/lnis-uofu/openfpga-master:latest
artifact_regression_tests:
name: Regression tests on code changes
runs-on: ubuntu-18.04
container: ghcr.io/lnis-uofu/openfpga-buildenv-test
container: ghcr.io/lnis-uofu/openfpga-env
needs: linux_build
strategy:
fail-fast: false
@ -229,10 +226,10 @@ jobs:
run: source .github/workflows/${{matrix.config.script}}
docker_regression_tests:
needs: change_detect
if: ${{ !needs.change_detect.outputs.source_modified }}
#if: ${{ !needs.change_detect.outputs.source_modified }}
name: Regression tests against master artifacts
runs-on: ubuntu-18.04
container: ghcr.io/lnis-uofu/openfpga-regression-tests:latest
container: ghcr.io/lnis-uofu/openfpga-master:latest
strategy:
fail-fast: false
matrix:
@ -252,4 +249,14 @@ jobs:
uses: actions/checkout@v2
- name: ${{matrix.config.name}}
shell: bash
run: source .github/workflows/${{matrix.config.script}}
run:
ln -s /opt/openfpga/abc abc/abc
ln -s /opt/openfpga/ace ace2/ace
ln -s /opt/openfpga/openfpga openfpga/openfpga
ln -s /opt/openfpga/vpr vpr/vpr
ln -s /opt/openfpga/yosys yosys/yosys
ln -s /opt/openfpga/yosys-abc yosys/yosys-abc
ln -s /opt/openfpga/yosys-config yosys/yosys-config
ln -s /opt/openfpga/yosys-filterlib yosys/yosys-filterlib
ln -s /opt/openfpga/yosys-smtbmc yosys/yosys-smtbmc
source .github/workflows/${{matrix.config.script}}

View File

@ -1,6 +1,5 @@
name: Build docker CI images
on:
- workflow_dispatch
on: push
jobs:
base_images:
name: Push Docker images
@ -24,14 +23,14 @@ jobs:
context: .
file: ./docker/Dockerfile.base
push: true
tags: ghcr.io/lnis-uofu/openfpga-buildenv-base:latest
- name: Build test image
tags: ghcr.io/lnis-uofu/openfpga-build-base:latest
- name: Build environment image
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/Dockerfile.test
file: ./docker/Dockerfile.env
push: true
tags: ghcr.io/lnis-uofu/openfpga-buildenv-test:latest
tags: ghcr.io/lnis-uofu/openfpga-env:latest
compiler_images:
name: Build ${{ matrix.compiler }} compiler image
needs: base_images
@ -65,4 +64,4 @@ jobs:
context: .
file: ./docker/Dockerfile.${{ matrix.compiler }}
push: true
tags: ghcr.io/lnis-uofu/openfpga-buildenv-${{ matrix.compiler }}:latest
tags: ghcr.io/lnis-uofu/openfpga-build-${{ matrix.compiler }}:latest

View File

@ -1,2 +0,0 @@
apt-get update && apt-get install -y \
libc6 libffi6 libgcc1 libreadline7 libstdc++6 libtcl8.6 python3 zlib1g libbz2-1.0

View File

@ -1,2 +1,2 @@
FROM ghcr.io/lnis-uofu/openfpga-buildenv-base
FROM ghcr.io/lnis-uofu/openfpga-build-base
RUN apt-get update && apt-get install -y clang-format-7 clang-6.0

View File

@ -1,2 +1,2 @@
FROM ghcr.io/lnis-uofu/openfpga-buildenv-base
FROM ghcr.io/lnis-uofu/openfpga-build-base
RUN apt-get update && apt-get install -y clang-format-7 clang-8

View File

@ -1,6 +1,6 @@
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
ADD .github/workflows/install_dependencies_test.sh install_dependencies_test.sh
ADD .github/workflows/install_dependencies_run.sh install_dependencies_run.sh
RUN bash install_dependencies_test.sh
ADD requirements.txt requirements.txt
RUN python3 -m pip install -r requirements.txt

View File

@ -1,2 +1,2 @@
FROM ghcr.io/lnis-uofu/openfpga-buildenv-base
FROM ghcr.io/lnis-uofu/openfpga-build-base
RUN apt-get update && apt-get install -y gcc-5 g++-5

View File

@ -1,2 +1,2 @@
FROM ghcr.io/lnis-uofu/openfpga-buildenv-base
FROM ghcr.io/lnis-uofu/openfpga-build-base
RUN apt-get update && apt-get install -y gcc-6 g++-6

View File

@ -1,2 +1,2 @@
FROM ghcr.io/lnis-uofu/openfpga-buildenv-base
FROM ghcr.io/lnis-uofu/openfpga-build-base
RUN apt-get update && apt-get install -y gcc-7 g++-7

View File

@ -1,2 +1,2 @@
FROM ghcr.io/lnis-uofu/openfpga-buildenv-base
FROM ghcr.io/lnis-uofu/openfpga-build-base
RUN apt-get update && apt-get install -y gcc-8 g++-8

View File

@ -1,4 +1,4 @@
FROM ghcr.io/lnis-uofu/openfpga-buildenv-base
FROM ghcr.io/lnis-uofu/openfpga-build-base
RUN apt-get install -y software-properties-common
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update && apt-get install -y gcc-9 g++-9

View File

@ -1,4 +1,4 @@
FROM ghcr.io/lnis-uofu/openfpga-buildenv-test:latest
FROM ghcr.io/lnis-uofu/openfpga-env
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

View File

@ -1,8 +0,0 @@
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
COPY .github/workflows/install_dependencies_runtime.sh install_dependencies_runtime.sh
RUN bash install_dependencies_runtime.sh
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}"