-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #515 from openziti/issue-514-package-for-redhat9
add redhat 9 build and package
- Loading branch information
Showing
8 changed files
with
118 additions
and
26 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
52 changes: 52 additions & 0 deletions
52
.github/actions/openziti-tunnel-build-action/redhat-9/Dockerfile
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,52 @@ | ||
ARG CMAKE_VERSION="3.26.3" | ||
|
||
FROM rockylinux:9 | ||
|
||
ARG CMAKE_VERSION | ||
|
||
LABEL org.opencontainers.image.authors="[email protected]" | ||
|
||
USER root | ||
WORKDIR /root/ | ||
|
||
ENV PATH="/usr/local/:${PATH}" | ||
ENV GIT_DISCOVERY_ACROSS_FILESYSTEM=1 | ||
ENV TZ=UTC | ||
|
||
RUN dnf install -y \ | ||
"@Development Tools" \ | ||
dnf-plugins-core \ | ||
iproute \ | ||
python3 \ | ||
systemd-devel \ | ||
zlib-devel \ | ||
systemd-rpm-macros \ | ||
cmake-rpm-macros \ | ||
openssl-devel \ | ||
libatomic \ | ||
&& dnf config-manager --set-enabled crb \ | ||
&& dnf install -y \ | ||
doxygen \ | ||
graphviz \ | ||
git \ | ||
ninja-build \ | ||
&& 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 | ||
|
||
ENV GIT_CONFIG_GLOBAL="/tmp/ziti-builder-gitconfig" | ||
|
||
ENV VCPKG_ROOT=/usr/local/vcpkg | ||
# this must be set on arm. see https://learn.microsoft.com/en-us/vcpkg/users/config-environment#vcpkg_force_system_binaries | ||
ENV VCPKG_FORCE_SYSTEM_BINARIES=yes | ||
|
||
RUN cd /usr/local \ | ||
&& git clone --branch 2023.04.15 https://github.com/microsoft/vcpkg \ | ||
&& ./vcpkg/bootstrap-vcpkg.sh -disableMetrics \ | ||
&& chmod -R ugo+rwX /usr/local/vcpkg | ||
|
||
WORKDIR /github/workspace | ||
COPY ./entrypoint.sh /root/ | ||
ENTRYPOINT [ "/root/entrypoint.sh" ] |
55 changes: 55 additions & 0 deletions
55
.github/actions/openziti-tunnel-build-action/redhat-9/entrypoint.sh
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,55 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# RedHat 9 | ||
# | ||
|
||
set -euo pipefail | ||
|
||
# these commands must be in the entrypoint so they are run after workspace is mounted on Docker workdir | ||
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 cmake preset, | ||
# else use ci-linux-x64 (which actually just uses native/host tools - e.g. not cross compile) | ||
if [ ${#} -ge 1 ]; then | ||
cmake_preset="${1}" | ||
else | ||
cmake_preset="ci-linux-x64" | ||
fi | ||
|
||
if [ ${#} -ge 2 ]; then | ||
cmake_config="${2}" | ||
else | ||
cmake_config="Release" | ||
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 | ||
# by newly-enforced directory boundaries in Git v2.35.2 | ||
# ref: https://lore.kernel.org/git/[email protected]/ | ||
for SAFE in \ | ||
/github/workspace \ | ||
/__w/ziti-tunnel-sdk-c/ziti-tunnel-sdk-c \ | ||
/mnt ; do | ||
git config --global --add safe.directory ${SAFE} | ||
done | ||
|
||
( | ||
[[ -d ./build ]] && rm -r ./build | ||
cmake -E make_directory ./build | ||
# allow unset for scl_source scripts | ||
set +u | ||
cmake \ | ||
--preset "${cmake_preset}" \ | ||
-DCMAKE_BUILD_TYPE="${cmake_config}" \ | ||
-DBUILD_DIST_PACKAGES=ON \ | ||
-S . \ | ||
-B ./build | ||
cmake \ | ||
--build ./build \ | ||
--config "${cmake_config}" \ | ||
--target package \ | ||
--verbose | ||
) |
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
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
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
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
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