Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve releases of .deb packages #5958

Merged
merged 6 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions .github/workflows/github-actions-build-deb-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['debian10', 'debian11', 'ubuntu20.04', 'ubuntu22.04']
os: ['debian11', 'ubuntu20.04', 'ubuntu22.04']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add ubuntu24.04

runs-on: ubuntu-latest
container:
image: openroad/${{ matrix.os }}-dev
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ coverage-output
.metals/

etc/openroad_deps_prefixes.txt

*debhelper*
debian/changelog
debian/files
debian/openroad
obj-x86_64-linux-gnu/
5 changes: 0 additions & 5 deletions debian/changelog

This file was deleted.

2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: openroad
Maintainer: Vegard Strand Lende <vegard@ascenium.com>
Maintainer: Vitor Bandeira <vvbandeira@precisioninno.com>
Build-Depends: debhelper-compat (= 12)
Standards-Version: 4.5.1
Rules-Requires-Root: no
Expand Down
29 changes: 29 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -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.
12 changes: 12 additions & 0 deletions debian/create-changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

if [ $# -ne 1 ]; then
echo "usage: $0 <VERSION>"
exit 1
fi

cat > debian/changelog <<EOF
openroad ($1) UNRELEASED; urgency=low

$(git log -1 --pretty=format:"-- %an <%ae> on %ad")
EOF
4 changes: 2 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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)


%:
Expand Down
2 changes: 2 additions & 0 deletions etc/DependencyInstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ _installDebianPackages() {
git \
groff \
lcov \
libffi-dev \
libgomp1 \
libomp-dev \
libpcre2-dev \
Expand All @@ -635,6 +636,7 @@ _installDebianPackages() {
tcl-dev \
tcl-tclreadline \
tcllib \
unzip \
wget \
zlib1g-dev

Expand Down
5 changes: 1 addition & 4 deletions etc/DockerHelper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 +
Expand Down Expand Up @@ -60,9 +60,6 @@ _setup() {
"opensuse")
osBaseImage="opensuse/leap"
;;
"debian10")
osBaseImage="debian:buster"
;;
"debian11")
osBaseImage="debian:bullseye"
;;
Expand Down
Loading