diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f346a5d..ce51528 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,5 +1,5 @@ -name: testing +name: Testing on: push: @@ -7,7 +7,7 @@ on: jobs: quicktest: - name: Quick test + name: Smoke test runs-on: ubuntu-latest steps: @@ -96,3 +96,126 @@ jobs: - name: Upload data to codecov uses: codecov/codecov-action@v2 + + package_dpkg: + needs: fulltest + name: Create packages for Debian/Ubuntu + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install packages needed for build + run: | + sudo apt-get install debhelper + + - name: Configure + run: | + ./autogen.sh + ./configure + cd packages/debian/ + ./configure + + - name: Build + run: | + cd packages/debian/ + make + + - name: Upload dpkg + uses: actions/upload-artifact@v2 + with: + name: package-amd64-dpkg + path: packages/debian/*.deb + + package_rpm: + needs: fulltest + name: Create packages for Redhat + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install packages needed for build + run: | + sudo apt-get install rpm + + - name: Configure + run: | + ./autogen.sh + ./configure + cd packages/rpm/ + ./configure + + - name: Build + run: | + make + HOME=$(pwd)/../ + cd packages/rpm/ + make + cd ../../ + mv ../rpmbuild ./ + + - name: Upload rpm + uses: actions/upload-artifact@v2 + with: + name: package-amd64-rpm + path: rpmbuild/RPMS/x86_64/*.rpm + + package_windows: + needs: fulltest + name: Create packages for Windows + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - name: Configure and Build + shell: bash + run: | + ./scripts/hack_fakeautoconf + make + + - name: Create binary dir + shell: bash + run: | + make install DESTDIR=package + + - name: Upload binary zip + uses: actions/upload-artifact@v2 + with: + name: package-amd64-windows + path: package + + package_macos: + needs: fulltest + name: Create packages for MacOS + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install packages needed for build + run: | + brew install automake + + - name: Configure and Build + shell: bash + run: | + ./autogen.sh + ./configure + make + + - name: Create binary dir + shell: bash + run: | + make install DESTDIR=package + + - name: Upload binary zip + uses: actions/upload-artifact@v2 + with: + name: package-amd64-macos + path: package diff --git a/Makefile.in b/Makefile.in index 9e01e7f..aecf67e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -59,7 +59,6 @@ export MKDIR export INSTALL export INSTALL_PROG export INSTALL_DOC -export PREFIX export SBINDIR MKDIR=mkdir -p @@ -188,7 +187,7 @@ install: edge supernode edge.8.gz supernode.1.gz n2n.7.gz $(INSTALL_DOC) edge.8.gz $(MAN8DIR)/ $(INSTALL_DOC) supernode.1.gz $(MAN1DIR)/ $(INSTALL_DOC) n2n.7.gz $(MAN7DIR)/ - $(MAKE) -C tools install + $(MAKE) -C tools install SBINDIR=$(abspath $(SBINDIR)) # Docker builder section DOCKER_IMAGE_NAME=ntop/supernode diff --git a/autogen.sh b/autogen.sh index 1b5701e..a3bdbc0 100755 --- a/autogen.sh +++ b/autogen.sh @@ -8,9 +8,6 @@ N2N_PATCH="0" N2N_VERSION_SHORT="$N2N_MAJOR.$N2N_MINOR.$N2N_PATCH" cat configure.seed | sed \ - -e "s/@N2N_MAJOR@/$N2N_MAJOR/g" \ - -e "s/@N2N_MINOR@/$N2N_MINOR/g" \ - -e "s/@N2N_PATCH@/$N2N_PATCH/g" \ -e "s/@N2N_VERSION_SHORT@/$N2N_VERSION_SHORT/g" \ > configure.ac diff --git a/configure.seed b/configure.seed index 1a4032d..0226d3d 100644 --- a/configure.seed +++ b/configure.seed @@ -124,9 +124,6 @@ AC_SUBST(CC) AC_SUBST(AR) AC_SUBST(CFLAGS) AC_SUBST(LDFLAGS) -AC_SUBST(N2N_MAJOR) -AC_SUBST(N2N_MINOR) -AC_SUBST(N2N_PATCH) AC_SUBST(N2N_VERSION_SHORT) AC_SUBST(GIT_COMMITS) AC_SUBST(GIT_REVISION) diff --git a/packages/debian/Makefile.in b/packages/debian/Makefile.in index a660f6d..bb622f0 100644 --- a/packages/debian/Makefile.in +++ b/packages/debian/Makefile.in @@ -20,7 +20,7 @@ pkg: install -m644 ../../doc/*.md ${N2N_BUILD}/usr/share/doc/n2n/ @/bin/rm -f ../n2n*.deb dpkg-buildpackage -rfakeroot -d -us -uc @BUILDPACKAGE_EXTRA@ - dpkg-sig --sign builder -k D1EB60BE ../n2n_*deb + -dpkg-sig --sign builder -k D1EB60BE ../n2n_*deb @\rm -f ../n2n_*dsc ../n2n_*.gz ../n2n_*changes @/bin/mv ../n2n_*deb . @echo diff --git a/packages/rpm/Makefile.in b/packages/rpm/Makefile.in index d7d677a..68585a5 100644 --- a/packages/rpm/Makefile.in +++ b/packages/rpm/Makefile.in @@ -10,7 +10,7 @@ all: clean pkg pkg: rpmbuild -bb ./n2n.spec - @@RPM_SIGN_CMD@ $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(RPM_PKG) + -@@RPM_SIGN_CMD@ $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(RPM_PKG) @echo "" @echo "Package contents:" @rpm -qpl $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(RPM_PKG)