diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..808c0bc --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +ODIR = ./output +BRANCH = master +JOBS = - +TESTS = 1 +FILTER = + +.PHONY: clean purge test-all + +clean: + rm -rf $(ODIR) + +rmi: + docker images | grep symless/synergy-core | tr -s ' ' | cut -d ' ' -f 2 | xargs -I {} docker rmi symless/synergy-core:{} + +test-all: + ./test-core-all $(FILTER) -j $(JOBS) -b $(BRANCH) -J $(TESTS) diff --git a/build-core.sh b/build-container similarity index 88% rename from build-core.sh rename to build-container index 4f8d69b..f09114a 100755 --- a/build-core.sh +++ b/build-container @@ -26,20 +26,20 @@ while getopts "h" flag; do esac done -OS="${@:$OPTIND:1}" -VERSION=${@:$OPTIND+1:1} +OS="${*:$OPTIND:1}" +VERSION=${*:$OPTIND+1:1} echo -e " ARGUMENTS: OS: $OS VERSION: $VERSION " -if [ -z $OS ]; then +if [ -z "$OS" ]; then echo "The OS parameter is required!" usage fi -if [ -z $VERSION ]; then +if [ -z "$VERSION" ]; then echo "The VERSION parameter is required!" usage fi diff --git a/make-core.sh b/make-core similarity index 94% rename from make-core.sh rename to make-core index c5f3bdf..e9d94a6 100755 --- a/make-core.sh +++ b/make-core @@ -42,8 +42,8 @@ while getopts "hj:b:" flag; do esac done -OS="${@:$OPTIND:1}" -VERSION=${@:$OPTIND+1:1} +OS="${*:$OPTIND:1}" +VERSION=${*:$OPTIND+1:1} echo -e " ARGUMENTS: @@ -54,12 +54,12 @@ OPTIONS: JOBS: $JOBS BRANCH: $BRANCH " -if [ -z $OS ]; then +if [ -z "$OS" ]; then echo "The OS parameter is required!" usage fi -if [ -z $VERSION ]; then +if [ -z "$VERSION" ]; then echo "The VERSION parameter is required!" usage fi diff --git a/synergy-core/debian/12/Dockerfile b/synergy-core/debian/12/Dockerfile new file mode 100644 index 0000000..c90e4dc --- /dev/null +++ b/synergy-core/debian/12/Dockerfile @@ -0,0 +1,28 @@ +FROM debian:12 + +# Update base packages +RUN export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get upgrade -y \ + # Install Synergy core build dependencies + && apt-get install -y \ + build-essential \ + cmake \ + debhelper \ + devscripts \ + git \ + libavahi-compat-libdnssd-dev \ + libgdk-pixbuf2.0-dev \ + libgl1-mesa-dev \ + libglib2.0-dev \ + libnotify-dev \ + libssl-dev \ + libx11-dev \ + libxkbfile-dev \ + libxtst-dev \ + qtbase5-dev \ + qttools5-dev \ + qttools5-dev-tools \ + zip \ + && rm -rf /var/lib/apt/lists \ + && git config --system --add safe.directory '*' diff --git a/synergy-core/fedora/39/Dockerfile b/synergy-core/fedora/39/Dockerfile new file mode 100644 index 0000000..ad7950a --- /dev/null +++ b/synergy-core/fedora/39/Dockerfile @@ -0,0 +1,27 @@ +FROM fedora:39 + +# Update base packages +RUN dnf -y update \ + # Install Synergy core build dependencies + && dnf -y install \ + avahi-compat-libdns_sd \ + avahi-compat-libdns_sd-devel \ + cmake3 \ + desktop-file-utils \ + gdk-pixbuf2-devel \ + git \ + glib2-devel \ + gpg \ + libcurl-devel \ + libnotify-devel \ + libxkbfile-devel \ + libXtst-devel \ + make \ + openssl-devel \ + qt5-qtbase-devel \ + qt5-qtdeclarative-devel \ + qt5-qttools-devel \ + rpm-build \ + rpmlint \ + && rm -rf /var/cache/yum \ + && git config --system --add safe.directory '*' diff --git a/synergy-core/fedora/rawhide/Dockerfile b/synergy-core/fedora/rawhide/Dockerfile new file mode 100644 index 0000000..52b15c5 --- /dev/null +++ b/synergy-core/fedora/rawhide/Dockerfile @@ -0,0 +1,27 @@ +FROM fedora:rawhide + +# Update base packages +RUN dnf -y update \ + # Install Synergy core build dependencies + && dnf -y install \ + avahi-compat-libdns_sd \ + avahi-compat-libdns_sd-devel \ + cmake3 \ + desktop-file-utils \ + gdk-pixbuf2-devel \ + git \ + glib2-devel \ + gpg \ + libcurl-devel \ + libnotify-devel \ + libxkbfile-devel \ + libXtst-devel \ + make \ + openssl-devel \ + qt5-qtbase-devel \ + qt5-qtdeclarative-devel \ + qt5-qttools-devel \ + rpm-build \ + rpmlint \ + && rm -rf /var/cache/yum \ + && git config --system --add safe.directory '*' diff --git a/synergy-core/ubuntu/22.10/Dockerfile b/synergy-core/ubuntu/rolling/Dockerfile similarity index 97% rename from synergy-core/ubuntu/22.10/Dockerfile rename to synergy-core/ubuntu/rolling/Dockerfile index eea1bda..6cae966 100644 --- a/synergy-core/ubuntu/22.10/Dockerfile +++ b/synergy-core/ubuntu/rolling/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.10 +FROM ubuntu:rolling # Update base packages RUN export DEBIAN_FRONTEND=noninteractive \ diff --git a/test-core.sh b/test-core similarity index 78% rename from test-core.sh rename to test-core index 3078f35..c2024d5 100755 --- a/test-core.sh +++ b/test-core @@ -34,8 +34,8 @@ while getopts "hj:b:" flag; do esac done -OS="${@:$OPTIND:1}" -VERSION=${@:$OPTIND+1:1} +OS="${*:$OPTIND:1}" +VERSION=${*:$OPTIND+1:1} echo -e " ARGUMENTS: @@ -46,12 +46,12 @@ OPTIONS: JOBS: $JOBS BRANCH: $BRANCH " -if [ -z $OS ]; then +if [ -z "$OS" ]; then echo "The OS parameter is required!" usage fi -if [ -z $VERSION ]; then +if [ -z "$VERSION" ]; then echo "The VERSION parameter is required!" usage fi @@ -64,5 +64,5 @@ trap 'echo "\"${BASH_COMMAND}\" command filed with exit code $?."' DEBUG mkdir -p output -./build-core.sh "$OS" "$VERSION" |& tee "./output/synergy-core-$OS$VERSION.txt" -./make-core.sh -j "$JOBS" -b "$BRANCH" "$OS" "$VERSION" |& tee -a "./output/synergy-core-$OS$VERSION.txt" +./build-container "$OS" "$VERSION" |& tee "./output/synergy-core-$OS-$VERSION.txt" +./make-core -j "$JOBS" -b "$BRANCH" "$OS" "$VERSION" |& tee -a "./output/synergy-core-$OS-$VERSION.txt" diff --git a/test-core-all.sh b/test-core-all similarity index 71% rename from test-core-all.sh rename to test-core-all index b87cd1b..dc7ccaf 100755 --- a/test-core-all.sh +++ b/test-core-all @@ -1,6 +1,7 @@ #! /usr/bin/env bash JOBS="1" +TESTS="1" BRANCH="master" FILTER="" @@ -27,18 +28,21 @@ OPTIONS: exit 1 } -while getopts "hj:b:" flag; do +while getopts "hj:b:J:" flag; do case "$flag" in j) JOBS=$OPTARG;; + J) TESTS=$OPTARG;; b) BRANCH=$OPTARG;; *) usage;; esac done -FILTER=${@:$OPTIND} +FILTER=${*:$OPTIND} echo -e " ARGUMENTS: + TESTS: $TESTS + JOBS: $JOBS FILTER: $FILTER OPTIONS: @@ -50,13 +54,9 @@ docker container prune -f function args_pairs() { for os in "$1"/*; do for version in "$os"/*; do - if [ "ubuntu 16.04" = "$(basename "$os") $(basename "$version")" ]; then - echo "-j 1 $(basename "$os") $(basename "$version")" - else - echo "-j $JOBS $(basename "$os") $(basename "$version")" - fi + echo "-j $JOBS $(basename "$os") $(basename "$version")" done done } -args_pairs "./synergy-core" | grep "$FILTER" | xargs -L1 ./test-core.sh -b "$BRANCH" +args_pairs "./synergy-core" | grep "$FILTER" | xargs -L1 -P "$TESTS" ./test-core -b "$BRANCH"