-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Containerized builds through GitHub Actions. (#21)
Added containerized builds for: * Alpine 3.12 * CentOS 5.11 * CentOS 8.2 (which has OpenSSL 1.1.1c for backward compatibility with 8.0-8.2). **Drive-by changes**: * Forward ported the latest improvements from `python-package`. * Specific support for Amazon Linux 2 and RHEL 7 was removed. * Trimmed down Alpine deps, to have it work on minimal containers. * Updated embedded OpenSSL libs to 1.1.1k. * Updated `cryptography` to 3.4.7. * Updated `pip` to latest version.
- Loading branch information
Showing
15 changed files
with
264 additions
and
136 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
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,108 @@ | ||
# | ||
# GitHub actions for building and testing. | ||
# | ||
# For best support, use `-latest` for runners spinning up containers. More at | ||
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners. | ||
|
||
name: Docker | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
concurrency: | ||
group: docker-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
# Set to 'yes' to open a tunnel to GitHub's VMs through tmate on failures. | ||
# Also increase timeout-minutes for the relevant OS when debugging remotely. | ||
env: | ||
TMATE_DEBUG: 'no' | ||
|
||
# Using a job name that doesn't contain the OS name, to minimize the risk of | ||
# confusion with the OS names of the containers, which are the relevant ones. | ||
jobs: | ||
latest: | ||
runs-on: ubuntu-latest | ||
container: ${{ matrix.container }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
container: [ 'alpine:3.12', 'centos:8.2.2004', 'centos:5.11' ] | ||
timeout-minutes: 30 | ||
steps: | ||
|
||
# OpenSSL gets updated by apk, but that is the Alpine way, so it's fine. | ||
- name: Alpine 3.12 setup | ||
if: matrix.container == 'alpine:3.12' | ||
run: | | ||
apk update | ||
apk upgrade | ||
apk add git curl bash openssh-client | ||
curl -o /usr/local/bin/paxctl https://binary.chevah.com/third-party-stuff/alpine/paxctl-3.12 | ||
chmod +x /usr/local/bin/paxctl | ||
# Stick to CentOS 8.2 as OpenSSL got updated in 8.3 from 1.1.1c to 1.1.1g. | ||
- name: CentOS 8.2 setup | ||
if: matrix.container == 'centos:8.2.2004' | ||
run: | | ||
sed -i s/^mirrorlist=/#mirrorlist=/ /etc/yum.repos.d/*.repo | ||
sed -i s@^#baseurl=http://mirror.centos.org/\$contentdir/\$releasever/@baseurl=https://vault.centos.org/8.2.2004/@ /etc/yum.repos.d/*.repo | ||
yum -y upgrade | ||
yum -y install git curl openssh-clients | ||
# Final CentOS 5 version is used to build the generic Linux package. | ||
- name: CentOS 5.11 setup | ||
if: matrix.container == 'centos:5.11' | ||
run: | | ||
sed -i s/^mirrorlist=/#mirrorlist=/ /etc/yum.repos.d/*.repo | ||
sed -i s@^#baseurl=http://mirror.centos.org/centos/\$releasever/@baseurl=http://vault.centos.org/5.11/@ /etc/yum.repos.d/*.repo | ||
yum -y upgrade | ||
# Use http://binary.chevah.com/third-party-stuff/centos5/tuxad/ | ||
# when tuxad.de dissapears, it has the minimum required stuff. | ||
rpm -i http://www.tuxad.de/rpms/tuxad-release-5-1.noarch.rpm | ||
yum -y install curl openssh-clients gcc44 make m4 patch unzip wget | ||
ln -s /usr/bin/gcc44 /usr/local/bin/gcc | ||
wget --mirror --no-parent https://binary.chevah.com/third-party-stuff/centos5/endpoint/ | ||
cd binary.chevah.com/third-party-stuff/centos5/endpoint/ | ||
rpm -i local-perl-*.rpm | ||
rpm -i --nodeps git{-core,}-2.5.0-1.ep.x86_64.rpm | ||
- name: Clone repo independently | ||
run: | | ||
git clone https://github.com/chevah/pythia.git | ||
cd pythia | ||
git checkout ${GITHUB_HEAD_REF} | ||
- name: Build Pythia | ||
run: | | ||
cd pythia | ||
./pythia build | ||
- name: Test Pythia | ||
run: | | ||
cd pythia | ||
./pythia test | ||
# Using `~/` is problematic under Docker, use `/root/`. | ||
# Remove key in same step to avoid leaving it on disk if publishing fails. | ||
- name: Upload testing package | ||
run: | | ||
mkdir -pv /root/.ssh/ | ||
cd pythia | ||
touch priv_key | ||
chmod 600 priv_key | ||
echo "${{ secrets.SFTPPLUS_BIN_PRIV_KEY }}" > priv_key | ||
echo "${{ secrets.SFTPPLUS_BIN_HOST_KEY }}" > /root/.ssh/known_hosts | ||
./publish_dist.sh ; rm priv_key | ||
# If one of the above steps fails, fire up tmate for remote debugging. | ||
# Not working on Alpine (not supported) and CentOS 5 (glibc too old). | ||
- name: Tmate debug on failure | ||
if: failure() && env.TMATE_DEBUG == 'yes' | ||
uses: mxschmitt/action-tmate@v3 | ||
with: | ||
sudo: false | ||
limit-access-to-actor: true |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.