diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4dfdbb6c7..5d7410a49 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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}} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b0249117f..82e6c687e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -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 diff --git a/.github/workflows/install_dependencies_test.sh b/.github/workflows/install_dependencies_run.sh similarity index 100% rename from .github/workflows/install_dependencies_test.sh rename to .github/workflows/install_dependencies_run.sh diff --git a/.github/workflows/install_dependencies_runtime.sh b/.github/workflows/install_dependencies_runtime.sh deleted file mode 100644 index 7aafb31c6..000000000 --- a/.github/workflows/install_dependencies_runtime.sh +++ /dev/null @@ -1,2 +0,0 @@ -apt-get update && apt-get install -y \ - libc6 libffi6 libgcc1 libreadline7 libstdc++6 libtcl8.6 python3 zlib1g libbz2-1.0 diff --git a/docker/Dockerfile.clang-6.0 b/docker/Dockerfile.clang-6.0 index a1b4d4bbe..6d7c36b3e 100644 --- a/docker/Dockerfile.clang-6.0 +++ b/docker/Dockerfile.clang-6.0 @@ -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 diff --git a/docker/Dockerfile.clang-8 b/docker/Dockerfile.clang-8 index 4224c869d..5a4a5f4ef 100644 --- a/docker/Dockerfile.clang-8 +++ b/docker/Dockerfile.clang-8 @@ -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 diff --git a/docker/Dockerfile.test b/docker/Dockerfile.env similarity index 68% rename from docker/Dockerfile.test rename to docker/Dockerfile.env index 39da4722d..4c111c3d4 100644 --- a/docker/Dockerfile.test +++ b/docker/Dockerfile.env @@ -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 diff --git a/docker/Dockerfile.gcc-5 b/docker/Dockerfile.gcc-5 index 78f037b68..f1ee75572 100644 --- a/docker/Dockerfile.gcc-5 +++ b/docker/Dockerfile.gcc-5 @@ -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 diff --git a/docker/Dockerfile.gcc-6 b/docker/Dockerfile.gcc-6 index abb8e107b..89ae008f2 100644 --- a/docker/Dockerfile.gcc-6 +++ b/docker/Dockerfile.gcc-6 @@ -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 diff --git a/docker/Dockerfile.gcc-7 b/docker/Dockerfile.gcc-7 index 4cf7c4074..d7638677b 100644 --- a/docker/Dockerfile.gcc-7 +++ b/docker/Dockerfile.gcc-7 @@ -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 diff --git a/docker/Dockerfile.gcc-8 b/docker/Dockerfile.gcc-8 index 33a5e911a..187a47623 100644 --- a/docker/Dockerfile.gcc-8 +++ b/docker/Dockerfile.gcc-8 @@ -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 diff --git a/docker/Dockerfile.gcc-9 b/docker/Dockerfile.gcc-9 index 224277a9a..b6df13651 100644 --- a/docker/Dockerfile.gcc-9 +++ b/docker/Dockerfile.gcc-9 @@ -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 diff --git a/docker/Dockerfile.regression b/docker/Dockerfile.master similarity index 85% rename from docker/Dockerfile.regression rename to docker/Dockerfile.master index 25ba2cbbd..6bd366132 100644 --- a/docker/Dockerfile.regression +++ b/docker/Dockerfile.master @@ -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 diff --git a/docker/Dockerfile.run b/docker/Dockerfile.run deleted file mode 100644 index f73aeec38..000000000 --- a/docker/Dockerfile.run +++ /dev/null @@ -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}"