Skip to content

Commit

Permalink
Merge branch 'main' of github.com:openziti/ziti-tunnel-sdk-c into iss…
Browse files Browse the repository at this point in the history
…ue-514-package-for-redhat9
  • Loading branch information
qrkourier committed Dec 9, 2022
2 parents 90b0a63 + 4d404cb commit b59f0b7
Show file tree
Hide file tree
Showing 44 changed files with 766 additions and 142 deletions.
4 changes: 2 additions & 2 deletions .github/actions/openziti-tunnel-build-action/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
- name: redhat
version: "7"
type: rpm
container: quay.io/centos/centos:7
container: docker.io/library/centos:7
- name: redhat
version: "8"
type: rpm
container: quay.io/rockylinux/rockylinux:8
container: docker.io/library/rockylinux:8

- name: configure build action for distro version
env:
Expand Down
9 changes: 6 additions & 3 deletions .github/actions/openziti-tunnel-build-action/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
name: 'OpenZiti Tunneler Build Action'
description: 'Builds ziti-edge-tunnel binary and install package for Linux'
author: 'NetFoundry'
outputs:
package_type:
description: lowercase filename suffix of the install package built by this action
inputs:
arch:
description: 'The architecture string used by entrypoint.sh to select CMAKE_TOOLCHAIN_FILE'
required: false
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.arch }}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
ARG CMAKE_VERSION="3.22.3"

FROM quay.io/centos/centos:7
FROM docker.io/library/centos:7

ARG CMAKE_VERSION

LABEL org.opencontainers.image.authors="[email protected],kenneth.bingham@netfoundry.io"
LABEL org.opencontainers.image.authors="support@netfoundry.io"

USER root
WORKDIR /root/
Expand All @@ -25,7 +25,7 @@ RUN yum -y install \
devtoolset-11-libatomic-devel \
&& yum clean all

RUN curl -L https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-linux-x86_64.sh -o cmake.sh \
RUN curl -sSfL https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-linux-$(uname -m).sh -o cmake.sh \
&& (bash cmake.sh --skip-license --prefix=/usr/local) \
&& rm cmake.sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ echo "INFO: GIT_DISCOVERY_ACROSS_FILESYSTEM=${GIT_DISCOVERY_ACROSS_FILESYSTEM}"
echo "INFO: WORKDIR=${PWD}"
echo "INFO: $(git --version)"

# if first positional is an expected arch string then set toolchain file, else default toolchain
if (( ${#} )); then
case ${1} in
amd64) CMAKE_TOOLCHAIN_FILE="default.cmake"
shift
;;
arm64) CMAKE_TOOLCHAIN_FILE="Linux-arm64.cmake"
shift
;;
arm) CMAKE_TOOLCHAIN_FILE="Linux-arm.cmake"
shift
;;
*) CMAKE_TOOLCHAIN_FILE="default.cmake"
;;
esac
else
CMAKE_TOOLCHAIN_FILE="default.cmake"
fi

# workspace dir for each build env is added to "safe" dirs in global config e.g.
# ~/.gitconfig so both runner and builder containers trust these dirs
# owned by different UIDs from that of Git's EUID. This is made necessary
Expand All @@ -24,13 +43,14 @@ done

cmake -E make_directory ./build
(
[[ -d ./build ]] && rm -r ./build
cmake -E make_directory ./build
# allow unset for scl_source scripts
set +u
cmake -E make_directory ./build
source scl_source enable devtoolset-11 \
&& cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=./toolchains/default.cmake \
-DCMAKE_TOOLCHAIN_FILE=./toolchains/${CMAKE_TOOLCHAIN_FILE} \
-DBUILD_DIST_PACKAGES=ON \
-DDISABLE_LIBSYSTEMD_FEATURE=ON \
-S . \
Expand Down
14 changes: 10 additions & 4 deletions .github/actions/openziti-tunnel-build-action/redhat-8/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
FROM quay.io/rockylinux/rockylinux:8
ARG CMAKE_VERSION="3.22.3"

LABEL org.opencontainers.image.authors="[email protected],[email protected]"
FROM rockylinux:8

ARG CMAKE_VERSION

LABEL org.opencontainers.image.authors="[email protected]"

USER root
WORKDIR /root/
Expand All @@ -11,7 +15,6 @@ ENV TZ=UTC

RUN dnf install -y \
"@Development Tools" \
cmake \
dnf-plugins-core \
gcc-toolset-10 \
gcc-toolset-10-libatomic-devel \
Expand All @@ -29,7 +32,10 @@ RUN dnf install -y \
git \
&& dnf clean all


RUN curl -sSfL https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-linux-$(uname -m).sh -o cmake.sh \
&& (bash cmake.sh --skip-license --prefix=/usr/local) \
&& rm cmake.sh

WORKDIR /github/workspace
COPY ./entrypoint.sh /root/
ENTRYPOINT [ "/root/entrypoint.sh" ]
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ echo "INFO: GIT_DISCOVERY_ACROSS_FILESYSTEM=${GIT_DISCOVERY_ACROSS_FILESYSTEM}"
echo "INFO: WORKDIR=${PWD}"
echo "INFO: $(git --version)"

# if first positional is an expected arch string then set toolchain file, else default toolchain
if (( ${#} )); then
case ${1} in
amd64) CMAKE_TOOLCHAIN_FILE="default.cmake"
shift
;;
arm64) CMAKE_TOOLCHAIN_FILE="Linux-arm64.cmake"
shift
;;
arm) CMAKE_TOOLCHAIN_FILE="Linux-arm.cmake"
shift
;;
*) CMAKE_TOOLCHAIN_FILE="default.cmake"
;;
esac
else
CMAKE_TOOLCHAIN_FILE="default.cmake"
fi

# workspace dir for each build env is added to "safe" dirs in global config e.g.
# ~/.gitconfig so both runner and builder containers trust these dirs
# owned by different UIDs from that of Git's EUID. This is made necessary
Expand All @@ -24,12 +43,14 @@ done

cmake -E make_directory ./build
(
[[ -d ./build ]] && rm -r ./build
cmake -E make_directory ./build
# allow unset for scl_source scripts
set +u
source scl_source enable gcc-toolset-10 \
&& cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=./toolchains/default.cmake \
-DCMAKE_TOOLCHAIN_FILE=./toolchains/${CMAKE_TOOLCHAIN_FILE} \
-DBUILD_DIST_PACKAGES=ON \
-DUSE_OPENSSL=ON \
-S . \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM ubuntu:trusty

ARG CMAKE_VERSION

LABEL org.opencontainers.image.authors="[email protected],kenneth.bingham@netfoundry.io"
LABEL org.opencontainers.image.authors="support@netfoundry.io"

ENV DEBIAN_FRONTEND=noninteractive
ENV GIT_DISCOVERY_ACROSS_FILESYSTEM=1
Expand Down Expand Up @@ -39,7 +39,7 @@ RUN update-alternatives \
--slave /usr/bin/g++ g++ /usr/bin/g++-9 \
--slave /usr/bin/gcov gcov /usr/bin/gcov-9

RUN curl -L https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-linux-x86_64.sh -o cmake.sh \
RUN curl -sSfL https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-linux-$(uname -m).sh -o cmake.sh \
&& (bash cmake.sh --skip-license --prefix=/usr/local) \
&& rm cmake.sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ echo "INFO: GIT_DISCOVERY_ACROSS_FILESYSTEM=${GIT_DISCOVERY_ACROSS_FILESYSTEM}"
echo "INFO: WORKDIR=${PWD}"
echo "INFO: $(git --version)"

# if first positional is an expected arch string then set toolchain file, else default toolchain
if (( ${#} )); then
case ${1} in
amd64) CMAKE_TOOLCHAIN_FILE="default.cmake"
shift
;;
arm64) CMAKE_TOOLCHAIN_FILE="Linux-arm64.cmake"
shift
;;
arm) CMAKE_TOOLCHAIN_FILE="Linux-arm.cmake"
shift
;;
*) CMAKE_TOOLCHAIN_FILE="default.cmake"
;;
esac
else
CMAKE_TOOLCHAIN_FILE="default.cmake"
fi

# workspace dir for each build env is added to "safe" dirs in global config e.g.
# ~/.gitconfig so both runner and builder containers trust these dirs
# owned by different UIDs from that of Git's EUID. This is made necessary
Expand All @@ -22,10 +41,11 @@ for SAFE in \
git config --global --add safe.directory ${SAFE}
done

[[ -d ./build ]] && rm -r ./build
cmake -E make_directory ./build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=./toolchains/default.cmake \
-DCMAKE_TOOLCHAIN_FILE=./toolchains/${CMAKE_TOOLCHAIN_FILE} \
-DBUILD_DIST_PACKAGES=ON \
-DDISABLE_LIBSYSTEMD_FEATURE=ON \
-S . \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM ubuntu:xenial

ARG CMAKE_VERSION

LABEL org.opencontainers.image.authors="[email protected],kenneth.bingham@netfoundry.io"
LABEL org.opencontainers.image.authors="support@netfoundry.io"

ENV DEBIAN_FRONTEND=noninteractive
ENV GIT_DISCOVERY_ACROSS_FILESYSTEM=1
Expand All @@ -28,7 +28,7 @@ RUN apt-get -y update \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*

RUN curl -L https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-linux-x86_64.sh -o cmake.sh \
RUN curl -sSfL https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-linux-$(uname -m).sh -o cmake.sh \
&& (bash cmake.sh --skip-license --prefix=/usr/local) \
&& rm cmake.sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ echo "INFO: GIT_DISCOVERY_ACROSS_FILESYSTEM=${GIT_DISCOVERY_ACROSS_FILESYSTEM}"
echo "INFO: WORKDIR=${PWD}"
echo "INFO: $(git --version)"

# if first positional is an expected arch string then set toolchain file, else default toolchain
if (( ${#} )); then
case ${1} in
amd64) CMAKE_TOOLCHAIN_FILE="default.cmake"
shift
;;
arm64) CMAKE_TOOLCHAIN_FILE="Linux-arm64.cmake"
shift
;;
arm) CMAKE_TOOLCHAIN_FILE="Linux-arm.cmake"
shift
;;
*) CMAKE_TOOLCHAIN_FILE="default.cmake"
;;
esac
else
CMAKE_TOOLCHAIN_FILE="default.cmake"
fi

# workspace dir for each build env is added to "safe" dirs in global config e.g.
# ~/.gitconfig so both runner and builder containers trust these dirs
# owned by different UIDs from that of Git's EUID. This is made necessary
Expand All @@ -22,12 +41,13 @@ for SAFE in \
git config --global --add safe.directory ${SAFE}
done

[[ -d ./build ]] && rm -r ./build
cmake \
-E make_directory \
./build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=./toolchains/default.cmake \
-DCMAKE_TOOLCHAIN_FILE=./toolchains/${CMAKE_TOOLCHAIN_FILE} \
-DBUILD_DIST_PACKAGES=ON \
-DDISABLE_LIBSYSTEMD_FEATURE=ON \
-S . \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
ARG CMAKE_VERSION="3.22.3"

# Ubuntu Bionic 18.04 LTS
FROM ubuntu:bionic

ARG CMAKE_VERSION

LABEL org.opencontainers.image.authors="[email protected],kenneth.bingham@netfoundry.io"
LABEL org.opencontainers.image.authors="support@netfoundry.io"

ENV DEBIAN_FRONTEND=noninteractive
ENV GIT_DISCOVERY_ACROSS_FILESYSTEM=1
Expand All @@ -15,22 +16,22 @@ WORKDIR /root/

ENV PATH="/usr/local/:${PATH}"

RUN apt-get -y update \
RUN apt-get update \
&& apt-get -y install \
build-essential \
curl \
doxygen \
git \
graphviz \
libsystemd-dev \
iproute2 \
pkg-config \
python3 \
libsystemd-dev \
zlib1g-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*

RUN curl -L https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-linux-x86_64.sh -o cmake.sh \
RUN curl -sSfL https://cmake.org/files/v${CMAKE_VERSION%.*}/cmake-${CMAKE_VERSION}-linux-$(uname -m).sh -o cmake.sh \
&& (bash cmake.sh --skip-license --prefix=/usr/local) \
&& rm cmake.sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@ echo "INFO: GIT_DISCOVERY_ACROSS_FILESYSTEM=${GIT_DISCOVERY_ACROSS_FILESYSTEM}"
echo "INFO: WORKDIR=${PWD}"
echo "INFO: $(git --version)"

# if first positional is an expected arch string then set toolchain file, else default toolchain
if (( ${#} )); then
case ${1} in
amd64) CMAKE_TOOLCHAIN_FILE="default.cmake"
shift
;;
arm64) CMAKE_TOOLCHAIN_FILE="Linux-arm64.cmake"
shift
;;
arm) CMAKE_TOOLCHAIN_FILE="Linux-arm.cmake"
shift
;;
*) CMAKE_TOOLCHAIN_FILE="default.cmake"
;;
esac
else
CMAKE_TOOLCHAIN_FILE="default.cmake"
fi

# workspace dir for each build env is added to "safe" dirs in global config e.g.
# ~/.gitconfig so both runner and builder containers trust these dirs
# owned by different UIDs from that of Git's EUID. This is made necessary
Expand All @@ -22,12 +41,13 @@ for SAFE in \
git config --global --add safe.directory ${SAFE}
done

[[ -d ./build ]] && rm -r ./build
cmake \
-E make_directory \
./build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=./toolchains/default.cmake \
-DCMAKE_TOOLCHAIN_FILE=./toolchains/${CMAKE_TOOLCHAIN_FILE} \
-DBUILD_DIST_PACKAGES=ON \
-DUSE_OPENSSL=ON \
-S . \
Expand Down
Loading

0 comments on commit b59f0b7

Please sign in to comment.