Skip to content

Commit

Permalink
Merge pull request #7 from sirtoobii/develop
Browse files Browse the repository at this point in the history
Simplyfied deb build, version++
  • Loading branch information
sirtoobii authored Mar 23, 2023
2 parents 2d13b7d + 3b53168 commit 227ec26
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 212 deletions.
35 changes: 0 additions & 35 deletions .github/actions/build-release-action/Dockerfile

This file was deleted.

40 changes: 0 additions & 40 deletions .github/actions/build-release-action/action.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/actions/build-release-action/make-deb.sh

This file was deleted.

75 changes: 75 additions & 0 deletions .github/workflows/build-deb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build .deb packages

on:
push:
tags:
- "v*"


jobs:
build_deb_packages:
strategy:
fail-fast: false
matrix:
include:
- distribution: debian
version: 10
node_version: '16.x'
- distribution: debian
version: 11
node_version: '18.x'
- distribution: ubuntu
version: 18.04
node_version: '16.x'
- distribution: ubuntu
version: 20.04
node_version: '18.x'
- distribution: ubuntu
version: 22.04
node_version: '18.x'


runs-on: ubuntu-latest
name: Build package for ${{ matrix.distribution }} ${{ matrix.version }}
container:
image: ${{ matrix.distribution }}:${{ matrix.version }}
env:
DEBIAN_FRONTEND: noninteractive
# sneaky hack to make caches work because the cache action lives outside the container
options: --mount type=volume,dst=/__w/wgwrangler/wgwrangler/,volume-driver=local,volume-opt=type=none,volume-opt=o=bind,volume-opt=device=${{ github.workspace }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
- name: Install OS requirements
run: apt-get update && apt-get install -yq perl make gcc devscripts openssl pkg-config libssl-dev debhelper automake libkrb5-dev libqrencode-dev g++ zlib1g-dev
- name: Node Cache
id: node-cache
uses: actions/cache@v3
with:
path: frontend/node_modules
key: ${{ matrix.distribution }}-node-${{ matrix.node_version }}-${{ hashFiles('package.json', '*/package.json','qx-lock.json', '*/qx-lock.json') }}
restore-keys: |
${{ matrix.distribution }}-node-${{ matrix.node_version }}-
- name: CPAN cache
id: cpan_cache
uses: actions/cache@v3
with:
path: thirdparty
key: ${{ matrix.distribution }}-cpan-${{ matrix.version }}-${{ hashFiles('cpanfile', '*/cpanfile', 'Makefile.am', '*/Makefile.am') }}
- name: Build package
id: build_package
run: bash make-deb.sh ${{ matrix.distribution }} ${{ matrix.version }}
- name: Release deb files
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ github.workspace }}/${{ steps.build_package.outputs.package_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

43 changes: 0 additions & 43 deletions .github/workflows/build-release.yaml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: CPAN Cache
id: cpan-cache
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: thirdparty
key: ${{ matrix.os }}-cpan-${{ matrix.perl }}-${{ hashFiles('**/cpanfile') }}
- name: Node Cache
id: node-cache
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: frontend/node_modules
key: ${{ matrix.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package.json') }}
Expand Down
7 changes: 7 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
wg-wrangler (0.3.0) unstable; urgency=medium

* Fixed incorrect handling of #+comment tags
* Extended IPManager module, we now support address reservations and per interface defaults

-- Tobias Bossert <[email protected]> Wed, 22 Mar 2023 12:12:48 +0100

wg-wrangler (0.2.3) unstable; urgency=medium

* Raised wg-meta version to 0.3.3 to fix deadlock when calling the reload callback
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.3
0.3.0
5 changes: 0 additions & 5 deletions build_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ cp -r . /src

cd /src

# workaround for debhelper bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897569
mkdir -p deb_build_home
ls | grep -v deb_build_home | xargs mv -t deb_build_home # move everything except deb_build_home
cd deb_build_home

dh_clean
dpkg-buildpackage -us -uc -nc

Expand Down
60 changes: 0 additions & 60 deletions debian/changelog

This file was deleted.

1 change: 1 addition & 0 deletions debian/changelog
20 changes: 20 additions & 0 deletions make-deb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
set -ex

DISTRIBUTION_NAME=$1
DISTRIBUTION_VERSION=$2

# Overriding $HOME to prevent permissions issues when running on github actions
mkdir -p /tmp/home
chmod 0777 /tmp/home
export HOME=/tmp/home

dh_clean
dpkg-buildpackage -us -uc -nc

release_number=${DISTRIBUTION_VERSION/\./\_}
package_name=$(basename ../wg-wrangler_*.deb | sed 's/.deb$//')_${DISTRIBUTION_NAME}-${release_number}.deb
mv ../wg-wrangler_*.deb "$package_name"

# set action output
echo "package_name=$package_name" >>$GITHUB_OUTPUT

0 comments on commit 227ec26

Please sign in to comment.