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 name: linux_build
# Run CI on push, PR, and weekly. # Run CI on push, PR, and weekly.
on: on:
push: workflow_dispatch:
pull_request: # push:
schedule: # pull_request:
- cron: '0 0 * * 0 ' # weekly # schedule:
# - cron: '0 0 * * 0 ' # weekly
# Environment variables # Environment variables
env: env:
@ -29,8 +31,10 @@ jobs:
- name: Check for source code changes - name: Check for source code changes
id: changes id: changes
run: | 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::$?" echo "::set-output name=status_code::$?"
else
echo "::set-output name=status_code::0"
fi fi
# Test the compilation compatibility # Test the compilation compatibility
linux_build: linux_build:
@ -38,7 +42,7 @@ jobs:
if: ${{needs.change_detect.outputs.source_modified || github.ref == 'refs/heads/master' }} if: ${{needs.change_detect.outputs.source_modified || github.ref == 'refs/heads/master' }}
name: ${{ matrix.config.name }} name: ${{ matrix.config.name }}
runs-on: ubuntu-18.04 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 # Branch on different OS and settings
strategy: strategy:
fail-fast: false fail-fast: false
@ -173,24 +177,17 @@ jobs:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }} password: ${{ secrets.CR_PAT }}
- name: Build and push runtime image - name: Build and push master image
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
file: ./docker/Dockerfile.run file: ./docker/Dockerfile.master
push: true push: true
tags: ghcr.io/lnis-uofu/openfpga-run:latest tags: ghcr.io/lnis-uofu/openfpga-master: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
artifact_regression_tests: artifact_regression_tests:
name: Regression tests on code changes name: Regression tests on code changes
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
container: ghcr.io/lnis-uofu/openfpga-buildenv-test container: ghcr.io/lnis-uofu/openfpga-env
needs: linux_build needs: linux_build
strategy: strategy:
fail-fast: false fail-fast: false
@ -229,10 +226,10 @@ jobs:
run: source .github/workflows/${{matrix.config.script}} run: source .github/workflows/${{matrix.config.script}}
docker_regression_tests: docker_regression_tests:
needs: change_detect needs: change_detect
if: ${{ !needs.change_detect.outputs.source_modified }} #if: ${{ !needs.change_detect.outputs.source_modified }}
name: Regression tests against master artifacts name: Regression tests against master artifacts
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
container: ghcr.io/lnis-uofu/openfpga-regression-tests:latest container: ghcr.io/lnis-uofu/openfpga-master:latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -252,4 +249,14 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: ${{matrix.config.name}} - name: ${{matrix.config.name}}
shell: bash 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 name: Build docker CI images
on: on: push
- workflow_dispatch
jobs: jobs:
base_images: base_images:
name: Push Docker images name: Push Docker images
@ -24,14 +23,14 @@ jobs:
context: . context: .
file: ./docker/Dockerfile.base file: ./docker/Dockerfile.base
push: true push: true
tags: ghcr.io/lnis-uofu/openfpga-buildenv-base:latest tags: ghcr.io/lnis-uofu/openfpga-build-base:latest
- name: Build test image - name: Build environment image
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: . context: .
file: ./docker/Dockerfile.test file: ./docker/Dockerfile.env
push: true push: true
tags: ghcr.io/lnis-uofu/openfpga-buildenv-test:latest tags: ghcr.io/lnis-uofu/openfpga-env:latest
compiler_images: compiler_images:
name: Build ${{ matrix.compiler }} compiler image name: Build ${{ matrix.compiler }} compiler image
needs: base_images needs: base_images
@ -65,4 +64,4 @@ jobs:
context: . context: .
file: ./docker/Dockerfile.${{ matrix.compiler }} file: ./docker/Dockerfile.${{ matrix.compiler }}
push: true 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 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 RUN apt-get update && apt-get install -y clang-format-7 clang-8

View File

@ -1,6 +1,6 @@
FROM ubuntu:18.04 FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive 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 RUN bash install_dependencies_test.sh
ADD requirements.txt requirements.txt ADD requirements.txt requirements.txt
RUN python3 -m pip install -r 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 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 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 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 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 apt-get install -y software-properties-common
RUN add-apt-repository ppa:ubuntu-toolchain-r/test RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update && apt-get install -y gcc-9 g++-9 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 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/ 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 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}"