diff --git a/.dockerignore b/.dockerignore index 48dba644c..289b353cc 100644 --- a/.dockerignore +++ b/.dockerignore @@ -19,3 +19,13 @@ run_local.bat run_local.sh vpr yosys + +!abc/abc +!ace2/ace +!openfpga/openfpga +!vpr/vpr +!yosys/yosys +!yosys/yosys-abc +!yosys/yosys-config +!yosys/yosys-filterlib +!yosys/yosys-smtbmc diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e46d2648f..bb93d63b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -135,6 +135,34 @@ jobs: yosys/yosys-config yosys/yosys-filterlib yosys/yosys-smtbmc + docker_distribution: + name: Build docker image for distribution + runs-on: ubuntu-latest + needs: linux_build + steps: + - name: Checkout OpenFPGA repo + uses: actions/checkout@v2 + - name: Download a built artifacts + uses: actions/download-artifact@v2 + with: + name: openfpga + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.CR_PAT }} + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + file: ./docker/Dockerfile.run + push: true + tags: ghcr.io/lnis-uofu/openfpga-run:latest regression_tests: name: Regression tests runs-on: ubuntu-18.04 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5203c0e95..b0249117f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -23,7 +23,6 @@ jobs: with: context: . file: ./docker/Dockerfile.base - add_git_labels: true push: true tags: ghcr.io/lnis-uofu/openfpga-buildenv-base:latest - name: Build test image @@ -31,17 +30,8 @@ jobs: with: context: . file: ./docker/Dockerfile.test - add_git_labels: true push: true tags: ghcr.io/lnis-uofu/openfpga-buildenv-test:latest - - name: Build run time image - uses: docker/build-push-action@v2 - with: - context: . - file: ./docker/Dockerfile.run - add_git_labels: true - push: true - tags: ghcr.io/lnis-uofu/openfpga-buildenv-run:latest compiler_images: name: Build ${{ matrix.compiler }} compiler image needs: base_images @@ -74,6 +64,5 @@ jobs: with: context: . file: ./docker/Dockerfile.${{ matrix.compiler }} - add_git_labels: true push: true tags: ghcr.io/lnis-uofu/openfpga-buildenv-${{ matrix.compiler }}:latest diff --git a/docker/Dockerfile.run b/docker/Dockerfile.run index f682513a3..f73aeec38 100644 --- a/docker/Dockerfile.run +++ b/docker/Dockerfile.run @@ -1,4 +1,8 @@ FROM ubuntu:18.04 ENV DEBIAN_FRONTEND=noninteractive -ADD .github/workflows/install_dependencies_runtime.sh install_dependencies_runtime.sh +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}"