Skip to content

Commit

Permalink
GHA DEBUGGING
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
  • Loading branch information
flichtenheld committed Dec 17, 2024
1 parent a6eda5f commit 1a61a3a
Showing 1 changed file with 8 additions and 93 deletions.
101 changes: 8 additions & 93 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ jobs:
- name: Get artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: "*-amd64"
path: msi

- name: Run AWS test
Expand All @@ -135,7 +136,7 @@ jobs:
needs: run_tclient_tests
name: upload-msis
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/master' && github.repository == 'openvpn/openvpn-build' }}
if: ${{ github.event_name != 'pull_request' && github.repository == 'openvpn/openvpn-build' }}

steps:
- name: Install knock
Expand All @@ -146,11 +147,14 @@ jobs:
with:
path: msi

- name: Flatter and rename artifacts
- name: Flatten and rename artifacts
working-directory: msi
run: |
find -name '*.msi' -printf "%p\n" | while read f; do mv $f $(dirname $f).msi; rm -rf $(dirname $f); done
find
find -name '*.msi' -printf "%p\n" | while read f; do mv -v $f $(dirname $f).msi; rm -rvf $(dirname $f); done
rm -rf t_client_openvpn_logs
rm -rf openvpn-debian
find
- name: Knock ports on remote
run: knock -d 500 ${{ secrets.MSI_UPLOAD_REMOTE_HOST }} ${{ secrets.MSI_UPLOAD_REMOTE_KNOCK_SEQUENCE }} ; sleep 1
Expand All @@ -165,93 +169,4 @@ jobs:
username: ${{ secrets.MSI_UPLOAD_USERNAME }}
privateKey: ${{ secrets.MSI_UPLOAD_PRIVATE_KEY }}
passphrase: ${{ secrets.MSI_UPLOAD_KEY_PASSPHRASE }}

debian:
name: Build Debian packages
runs-on: ubuntu-latest
env:
CHROOT_CONF: chroots/chroot.d.tar
OPENVPN_CURRENT_TAG: HEAD
OPENVPN_DCO_CURRENT_TAG: HEAD
USE_LOCAL_SOURCE: 1

steps:
- name: Checkout openvpn-build
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
submodules: true

- name: Install dependencies
run: |
sudo apt-get update
# for sbuild
sudo apt-get install -y sbuild git quilt debhelper dkms
# for ./configure && make dist
sudo apt-get install -y autoconf automake libcap-ng-dev libssl-dev python3-docutils
- name: Prepare release files
working-directory: release
run: |
ln -s vars.example vars
mkdir ../output
# we need to have ability to git tag the versions
# we do not push those tags
git config --global user.name "gha_user"
git config --global user.email "gha@openvpn.invalid"
./version-and-tags.sh
./create-release-files.sh
# So that the caches expire after a while
- name: Get Date for cache key
id: get-date
run: |
echo "date=$(/bin/date -u '+%Y%m')" >> $GITHUB_OUTPUT
- name: Restore cached chroots
id: chroots-restore
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: |
debian-sbuild/chroots
key: chroots-${{ hashFiles('**/config/variants.amd64.conf') }}-${{ steps.get-date.outputs.date }}
restore-keys: |
chroots-${{ hashFiles('**/config/variants.amd64.conf') }}-
chroots-
- name: Prepare environment
working-directory: debian-sbuild
run: |
[ ! -f "$CHROOT_CONF" ] || ( tar -xvf "$CHROOT_CONF" -C chroots; sudo install -m644 chroots/chroot.d/* /etc/schroot/chroot.d/ )
sudo chown root:root chroots/*.tar.gz || true
scripts/setup.sh
sudo scripts/setup_chroots.sh
sudo scripts/update-all.sh
sudo sbuild-adduser runner
tar -cvf "$CHROOT_CONF" -C /etc/schroot/ chroot.d/
- name: Save chroots
if: steps.chroots-restore.outputs.cache-hit != 'true'
id: chroots-save
uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: |
debian-sbuild/chroots
key: ${{ steps.chroots-restore.outputs.cache-primary-key }}

- name: Prepare package build
working-directory: debian-sbuild
run: |
scripts/prepare-all.sh
- name: Build packages
working-directory: debian-sbuild
run: |
sg sbuild ./scripts/build-all.sh
- name: Archive packages
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: openvpn-debian
path: |
output
verbose: true

0 comments on commit 1a61a3a

Please sign in to comment.