This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
name: Upload Release Asset | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: | | ||
set -x | ||
make -C rpm/ | ||
assets=() | ||
for asset in ./rpm/build/*.rpm; do | ||
assets+=("-a" "$asset") | ||
done | ||
tag_name="${GITHUB_REF##*/}" | ||
hub release create "${assets[@]}" -m "$tag_name" "$tag_name" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# DBT-7 packaging | ||
|
||
This repository contains scripts, relying on `docker-compose`, used to build | ||
`dbt7` packages. Only the RPM format for RHEL 8 based distros is currently | ||
supported. | ||
|
||
## Package building | ||
|
||
Execute the following `make` command to build the packages: | ||
```console | ||
$ make -C rpm | ||
``` | ||
|
||
Generated packages are located into the `rpm/build/` directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
UID := $(shell id -u $(USER)) | ||
GID := $(shell id -g $(USER)) | ||
|
||
all: bin | ||
|
||
bin: | ||
env UID=$(UID) GID=$(GID) docker compose run --rm dbt7-bin-rocky8; | ||
|
||
clean: | ||
rm build/*.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash -eux | ||
|
||
# DBT-7 version | ||
VERSION="0.3.0" | ||
TAG="v$VERSION" | ||
|
||
dnf update -y | ||
dnf install -y rpm-build redhat-rpm-config yum-utils curl unzip cmake make | ||
|
||
yum-builddep -y /workspace/rpm/dbt7.spec | ||
|
||
(cd /workspace && curl -OL https://github.com/osdldbt/dbt7/archive/refs/tags/${TAG}.tar.gz) | ||
|
||
rpmbuild \ | ||
--clean \ | ||
--define "pkgversion ${VERSION}" \ | ||
--define "_topdir ${PWD}/tmp/rpm" \ | ||
--define "_sourcedir ${PWD}/workspace" \ | ||
-bb /workspace/rpm/dbt7.spec | ||
|
||
rm /workspace/${TAG}.tar.gz | ||
mkdir -p ${PWD}/workspace/rpm/build/ | ||
cp ${PWD}/tmp/rpm/RPMS/*/*.rpm ${PWD}/workspace/rpm/build/. | ||
chown ${1}:${2} -R ${PWD}/workspace/rpm/build/ | ||
ls -lha ${PWD}/workspace/rpm/build/*.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
%global debug_package %{nil} | ||
%{!?pkgrevision: %global pkgrevision 1} | ||
%{!?pgversion: %global pgversion 14} | ||
%global pkgname dbt7 | ||
%define installpath /usr/bin | ||
%define _unpackaged_files_terminate_build 0 | ||
|
||
Name: %{pkgname} | ||
Version: %{pkgversion} | ||
Release: %{pkgrevision}%{?dist} | ||
Summary: Fair Use TPC Benchmark(TM) DS kit | ||
License: The Artistic License | ||
Source: v%{version}.tar.gz | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||
|
||
%description | ||
Fair Use TPC Benchmark(TM) H kit | ||
|
||
%prep | ||
%setup -q -n dbt7-%{version} | ||
|
||
%build | ||
PKG_CONFIG_PATH="/usr/pgsql-%{pgversion}/lib/pkgconfig" PATH=$PATH:/usr/pgsql-%{pgversion}/bin cmake -DCMAKE_INSTALL_PREFIX=%{buildroot}/%{installpath}/.. . | ||
make | ||
|
||
%install | ||
%{__install} -d %{buildroot}/%{installpath} | ||
make install | ||
mkdir -p %{buildroot}/usr/share/dbt7 | ||
|
||
# DSGen patches | ||
cp patches/dbt7-DSGen-software-code-3.2.0rc1.diff %{buildroot}/usr/share/dbt7/ | ||
cp patches/dbt7-DSGen-software-code-3.2.0rc1-postgresql-queries.diff %{buildroot}/usr/share/dbt7/ | ||
|
||
%files | ||
%{installpath}/dbt7-generate-report | ||
%{installpath}/dbt7-get-config | ||
%{installpath}/dbt7-load-test | ||
%{installpath}/dbt7-pgsql-create-db | ||
%{installpath}/dbt7-pgsql-create-indexes | ||
%{installpath}/dbt7-pgsql-create-tables | ||
%{installpath}/dbt7-pgsql-data-maintenance | ||
%{installpath}/dbt7-pgsql-dbstat | ||
%{installpath}/dbt7-pgsql-drop-tables | ||
%{installpath}/dbt7-pgsql-get-query-time | ||
%{installpath}/dbt7-pgsql-load-data | ||
%{installpath}/dbt7-pgsql-run-stream | ||
%{installpath}/dbt7-pgsql-start-db | ||
%{installpath}/dbt7-pgsql-stop-db | ||
%{installpath}/dbt7-pgsql-time-statistics | ||
%{installpath}/dbt7-plot-results | ||
%{installpath}/dbt7-post-process | ||
%{installpath}/dbt7-power-test | ||
%{installpath}/dbt7-run-workload | ||
%{installpath}/dbt7-sysstats | ||
%{installpath}/dbt7-throughput-test | ||
/usr/share/dbt7/dbt7-DSGen-software-code-3.2.0rc1.diff | ||
/usr/share/dbt7/dbt7-DSGen-software-code-3.2.0rc1-postgresql-queries.diff | ||
|
||
%changelog | ||
* Fri Oct 15 2021 Julien Tachoires <[email protected]> - master-1 | ||
- Initial packaging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '3' | ||
|
||
services: | ||
dbt7-bin-rocky8: | ||
image: rockylinux:8 | ||
environment: | ||
- VERSION | ||
volumes: | ||
- ..:/workspace | ||
command: /workspace/rpm/build.sh ${UID} ${GID} |