Browse Source

Add rules to run autogen/configure and use them in some of the simpler CI builds

pull/1124/head
Hamish Coleman 1 year ago
parent
commit
87c20d750e
  1. 22
      .github/workflows/tests.yml
  2. 6
      Makefile
  3. 13
      scripts/hack_fakeautoconf.sh

22
.github/workflows/tests.yml

@ -21,8 +21,6 @@ jobs:
- name: Run minimal test set - name: Run minimal test set
run: | run: |
./autogen.sh
./configure
make test make test
- if: ${{ failure() }} - if: ${{ failure() }}
@ -55,7 +53,7 @@ jobs:
- name: Run minimal test set - name: Run minimal test set
run: | run: |
./autogen.sh make configure
./configure \ ./configure \
--enable-pthread \ --enable-pthread \
--enable-miniupnp \ --enable-miniupnp \
@ -78,12 +76,6 @@ jobs:
run: | run: |
git fetch --force --tags git fetch --force --tags
- name: Make the makefiles
run: |
./autogen.sh
./configure
- name: Install essential - name: Install essential
run: | run: |
sudo apt update sudo apt update
@ -118,7 +110,7 @@ jobs:
- name: Make the makefiles - name: Make the makefiles
run: | run: |
./autogen.sh make configure
export CFLAGS="${{ matrix.flags }}" export CFLAGS="${{ matrix.flags }}"
export LDFLAGS="${{ matrix.flags }}" export LDFLAGS="${{ matrix.flags }}"
@ -164,10 +156,8 @@ jobs:
sudo apt-get update sudo apt-get update
sudo apt-get install build-essential sudo apt-get install build-essential
- name: generate a makefile and use it to install more packages - name: Install required packages
run: | run: |
./autogen.sh
./configure
make build-dep make build-dep
shell: bash shell: bash
@ -230,14 +220,12 @@ jobs:
git fetch --force --tags git fetch --force --tags
- name: Install packages - name: Install essential
run: | run: |
brew install automake brew install automake
- name: generate a makefile and use it to install more packages - name: Install required packages
run: | run: |
./autogen.sh
./configure
make build-dep make build-dep
shell: bash shell: bash

6
Makefile

@ -193,7 +193,6 @@ COVERAGEDIR?=coverage
.PHONY: $(SUBDIRS) .PHONY: $(SUBDIRS)
.PHONY: all
all: version $(APPS) $(DOCS) $(SUBDIRS) all: version $(APPS) $(DOCS) $(SUBDIRS)
# This allows breaking the build if the version.sh script discovers # This allows breaking the build if the version.sh script discovers
@ -322,6 +321,11 @@ install: edge supernode edge.8.gz supernode.1.gz n2n.7.gz
$(INSTALL_DOC) n2n.7.gz $(MAN7DIR)/ $(INSTALL_DOC) n2n.7.gz $(MAN7DIR)/
$(MAKE) -C tools install SBINDIR=$(abspath $(SBINDIR)) $(MAKE) -C tools install SBINDIR=$(abspath $(SBINDIR))
configure include/config.h.in: configure.ac
autoreconf -if
config.mak include/config.h: config.mak.in include/config.h.in configure
./configure
# Docker builder section # Docker builder section
DOCKER_IMAGE_NAME=ntop/supernode DOCKER_IMAGE_NAME=ntop/supernode
DOCKER_IMAGE_VERSION=$N2N_VERSION_SHORT DOCKER_IMAGE_VERSION=$N2N_VERSION_SHORT

13
scripts/hack_fakeautoconf.sh

@ -3,6 +3,19 @@
# Specifically for windows, where installing autoconf looks suspiciously # Specifically for windows, where installing autoconf looks suspiciously
# like boiling the ocean. # like boiling the ocean.
cat <<EOF >include/config.h.in
// Created by hack fake autoconf for windows
// not actually a config input
EOF
cat <<EOF >configure
#!/bin/sh
echo Created by hack fake autoconf for windows
echo not a confgure script
exit 1
EOF
chmod a+x configure
cat >config.mak <<EOF cat >config.mak <<EOF
CC=gcc CC=gcc
AR=ar AR=ar

Loading…
Cancel
Save