Bug fix on Docker build and upload on master (#202)
* [CI/CD] Added force master image update option * [CI/CD] Fixed .dockerignore while master image building * [Test] checking correctness of source_modified flag * [Bugfix] Fixed openfpga_flow in dockerignore * [CICD] Added more context in dockerignore * [CICD] Updated Dockerfile.master * [CICD] Reverted test variables
This commit is contained in:
parent
3f5cc59c0a
commit
bdf03c8b26
|
@ -3,4 +3,21 @@
|
||||||
|
|
||||||
# Allow files and directories
|
# Allow files and directories
|
||||||
!/.github/**
|
!/.github/**
|
||||||
!/*.*
|
!/*.*
|
||||||
|
!/abc/abc
|
||||||
|
!/abc/libabc.a
|
||||||
|
!/ace2/ace
|
||||||
|
!/ace2/libace.a
|
||||||
|
!/openfpga/libopenfpga.a
|
||||||
|
!/openfpga/openfpga
|
||||||
|
!/vpr/libvpr.a
|
||||||
|
!/vpr/vpr
|
||||||
|
!/yosys/share/
|
||||||
|
!/yosys/yosys
|
||||||
|
!/yosys/yosys-abc
|
||||||
|
!/yosys/yosys-config
|
||||||
|
!/yosys/yosys-filterlib
|
||||||
|
!/yosys/yosys-smtbmc
|
||||||
|
!/openfpga_flow
|
||||||
|
!/openfpga.sh
|
||||||
|
!/openfpga_flow/
|
||||||
|
|
|
@ -21,7 +21,8 @@ jobs:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
outputs:
|
outputs:
|
||||||
# this is output as string, see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
|
# this is output as string, see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idoutputs
|
||||||
source_modified: ${{ steps.changes.outputs.status_code == '0' }}
|
source_modified: ${{ steps.changes.outputs.status_code == '1' }}
|
||||||
|
force_upload: false
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout OpenFPGA repo
|
- name: Checkout OpenFPGA repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -31,6 +32,7 @@ jobs:
|
||||||
- name: Check for source code changes
|
- name: Check for source code changes
|
||||||
id: changes
|
id: changes
|
||||||
run: |
|
run: |
|
||||||
|
git diff origin/master HEAD --name-status -- . ':!openfpga_flow' ':!docs'
|
||||||
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::0"
|
echo "::set-output name=status_code::0"
|
||||||
else
|
else
|
||||||
|
@ -159,7 +161,7 @@ jobs:
|
||||||
openfpga.sh
|
openfpga.sh
|
||||||
docker_distribution:
|
docker_distribution:
|
||||||
name: Build docker image for distribution
|
name: Build docker image for distribution
|
||||||
if: ${{ github.ref == 'refs/heads/master' }}
|
if: ${{ github.ref == 'refs/heads/master' || fromJSON(needs.change_detect.outputs.force_upload) }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: linux_build
|
needs: linux_build
|
||||||
steps:
|
steps:
|
||||||
|
@ -169,6 +171,9 @@ jobs:
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: openfpga
|
name: openfpga
|
||||||
|
- name: Update dockerignore to add openfpga_flow
|
||||||
|
run: |
|
||||||
|
cat .dockerignore
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
|
|
|
@ -1,14 +1,9 @@
|
||||||
FROM ghcr.io/lnis-uofu/openfpga-env
|
FROM ghcr.io/lnis-uofu/openfpga-env
|
||||||
RUN mkdir /opt/openfpga /opt/openfpga/openfpga /opt/openfpga/abc /opt/openfpga/ace2 /opt/openfpga/vpr /opt/openfpga/yosys
|
RUN mkdir -p /opt/openfpga
|
||||||
COPY openfpga/openfpga /opt/openfpga/openfpga/openfpga
|
|
||||||
COPY abc/abc /opt/openfpga/abc/
|
|
||||||
COPY ace2/ace /opt/openfpga/ace2/
|
|
||||||
COPY vpr/vpr /opt/openfpga/vpr/
|
|
||||||
COPY yosys/yosys yosys/yosys-abc yosys/yosys-config yosys/yosys-filterlib yosys/yosys-smtbmc /opt/openfpga/yosys/
|
|
||||||
COPY yosys/share /opt/openfpga/yosys/share
|
|
||||||
RUN cd /opt/openfpga && chmod +x abc/abc ace2/ace openfpga/openfpga vpr/vpr yosys/yosys yosys/yosys-abc yosys/yosys-config yosys/yosys-filterlib yosys/yosys-smtbmc
|
|
||||||
COPY openfpga_flow /opt/openfpga/openfpga_flow
|
|
||||||
COPY openfpga.sh /opt/openfpga/openfpga.sh
|
|
||||||
ENV PATH="/opt/openfpga/openfpga:/opt/openfpga/yosys:/opt/openfpga/ace2:/opt/openfpga/abc:/opt/openfpga/vpr:${PATH}"
|
|
||||||
ENV OPENFPGA_PATH="/opt/openfpga"
|
|
||||||
WORKDIR /opt/openfpga
|
WORKDIR /opt/openfpga
|
||||||
|
COPY . /opt/openfpga
|
||||||
|
RUN chmod +x abc/abc ace2/ace openfpga/openfpga vpr/vpr
|
||||||
|
RUN chmod +x yosys/yosys yosys/yosys-abc yosys/yosys-config yosys/yosys-filterlib yosys/yosys-smtbmc
|
||||||
|
ENV PATH="/opt/openfpga/openfpga:/opt/openfpga/yosys:${PATH}"
|
||||||
|
ENV PATH="/opt/openfpga/ace2:/opt/openfpga/abc:/opt/openfpga/vpr:${PATH}"
|
||||||
|
ENV OPENFPGA_PATH="/opt/openfpga"
|
||||||
|
|
Loading…
Reference in New Issue