diff --git a/.github/workflows/github-actions-build-deb-package.yml b/.github/workflows/github-actions-build-deb-package.yml index 80435c93132..a1dcdc1faff 100644 --- a/.github/workflows/github-actions-build-deb-package.yml +++ b/.github/workflows/github-actions-build-deb-package.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['debian10', 'debian11', 'ubuntu20.04', 'ubuntu22.04'] + os: ['debian11', 'ubuntu20.04', 'ubuntu22.04'] runs-on: ubuntu-latest container: image: openroad/${{ matrix.os }}-dev @@ -21,10 +21,17 @@ jobs: with: submodules: true + - name: Set release version + id: set_version + run: | + echo "RELEASE_VERSION=$(git describe | sed 's/v//')" >> $GITHUB_ENV + echo "RELEASE_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + - name: Build package run: | - mkdir artifacts + ./debian/create-changelog.sh $RELEASE_VERSION debuild --preserve-env --preserve-envvar=PATH -B + mkdir -p artifacts mv ../openroad_* artifacts - name: Rename artifact @@ -45,17 +52,13 @@ jobs: name: ${{ steps.artifact.outputs.name }} path: ${{ steps.artifact.outputs.file }} - - name: Set release version - id: set_version - run: echo "RELEASE_VERSION=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - - name: Get release info uses: cardinalby/git-get-release-action@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ env.RELEASE_VERSION }} - release_name: Release ${{ env.RELEASE_VERSION }} + release_name: ${{ env.RELEASE_VERSION }} doNotFailIfNotFound: true id: release_info @@ -66,8 +69,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ env.RELEASE_VERSION }} - release_name: Release ${{ env.RELEASE_VERSION }} - body: "Release" + release_name: ${{ env.RELEASE_VERSION }} + body: "Release ${{ env.RELEASE_VERSION }} on ${{ env.RELEASE_DATE }}" id: create_release - name: Upload Release Asset diff --git a/.gitignore b/.gitignore index 0f25bea6277..631e4d0862f 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,9 @@ coverage-output .metals/ etc/openroad_deps_prefixes.txt + +*debhelper* +debian/changelog +debian/files +debian/openroad +obj-x86_64-linux-gnu/ diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 800b6c504a0..00000000000 --- a/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -openroad (2.0) UNRELEASED; urgency=low - - * Initial debian package release - - -- Vegard Strand Lende Wed, 04 Jan 2023 13:01:27 +0100 diff --git a/debian/control b/debian/control index 9a2fa4c7898..ec32d09c1c3 100644 --- a/debian/control +++ b/debian/control @@ -1,5 +1,5 @@ Source: openroad -Maintainer: Vegard Strand Lende +Maintainer: Vitor Bandeira Build-Depends: debhelper-compat (= 12) Standards-Version: 4.5.1 Rules-Requires-Root: no diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 00000000000..84b1eb1a81a --- /dev/null +++ b/debian/copyright @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2018-2023, The Regents of the University of California +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/debian/create-changelog.sh b/debian/create-changelog.sh new file mode 100755 index 00000000000..320f475f707 --- /dev/null +++ b/debian/create-changelog.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +if [ $# -ne 1 ]; then + echo "usage: $0 " + exit 1 +fi + +cat > debian/changelog < on %ad") +EOF diff --git a/debian/rules b/debian/rules index e0d40d21087..4512dc18b7b 100755 --- a/debian/rules +++ b/debian/rules @@ -2,11 +2,11 @@ include /usr/share/dpkg/default.mk -export DH_VERBOSE = 1 +export DH_VERBOSE=1 export DEB_BUILD_MAINT_OPTIONS=optimize=-lto -export OPENROAD_EXE = $(abspath ./obj-x86_64-linux-gnu/src/openroad) +export OPENROAD_EXE=$(abspath ./obj-x86_64-linux-gnu/src/openroad) %: diff --git a/etc/DependencyInstaller.sh b/etc/DependencyInstaller.sh index ae35b769010..5ac3fd8fcff 100755 --- a/etc/DependencyInstaller.sh +++ b/etc/DependencyInstaller.sh @@ -623,6 +623,7 @@ _installDebianPackages() { git \ groff \ lcov \ + libffi-dev \ libgomp1 \ libomp-dev \ libpcre2-dev \ @@ -635,6 +636,7 @@ _installDebianPackages() { tcl-dev \ tcl-tclreadline \ tcllib \ + unzip \ wget \ zlib1g-dev diff --git a/etc/DockerHelper.sh b/etc/DockerHelper.sh index 8cc8d8b27a0..de32db17aff 100755 --- a/etc/DockerHelper.sh +++ b/etc/DockerHelper.sh @@ -19,7 +19,7 @@ usage: $0 [CMD] [OPTIONS] push Push the docker image to Docker Hub OPTIONS: - -os=OS_NAME Choose between ubuntu22.04 (default), ubuntu20.04, rhel, opensuse, debian10 and debian11. + -os=OS_NAME Choose between ubuntu22.04 (default), ubuntu20.04, rhel, opensuse and debian11. -target=TARGET Choose target for the Docker image: 'dev': os + packages to compile app 'builder': os + packages to compile app + @@ -60,9 +60,6 @@ _setup() { "opensuse") osBaseImage="opensuse/leap" ;; - "debian10") - osBaseImage="debian:buster" - ;; "debian11") osBaseImage="debian:bullseye" ;;