From: Tobias Heider Date: Fri, 4 Aug 2023 17:00:26 +0000 (+0200) Subject: Add CI builds for Ubuntu, OpenBSD, FreeBSD and NetBSD (#229) X-Git-Tag: v10.0.3~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df3e2a164203c976562ee11f71ec8fe6626507a1;p=thirdparty%2Fdhcpcd.git Add CI builds for Ubuntu, OpenBSD, FreeBSD and NetBSD (#229) --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..caacf7b5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,86 @@ +name: Build + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + CC: clang + +jobs: + ubuntu: + strategy: + matrix: + os: [ ubuntu-latest, ubuntu-22.04 ] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Configure + run: ./configure --prefix=/usr + + - name: Build + run: make + + openbsd: + runs-on: macos-12 + steps: + - name: Bootstrap OpenBSD-latest + uses: mario-campos/emulate@v1 + with: + operating-system: openbsd-latest + + - name: Install Dependencies + run: pkg_add git + + - name: Build + run: | + git clone --depth=1 "${{ github.server_url }}/${{ github.repository }}" build + cd build + [ "${{ github.event.pull_request.number }}" = "" ] || (echo "fetching PR ${{ github.event.pull_request.number }}"; git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }} && git checkout "pr-${{ github.event.pull_request.number }}") + echo "configure" + ./configure --prefix=/usr + echo "building" + make + + freebsd: + runs-on: macos-12 + steps: + - name: Bootstrap FreeBSD-latest + uses: mario-campos/emulate@v1 + with: + operating-system: freebsd-latest + + - name: Install Dependencies + run: pkg install -y git + + - name: Build + run: | + git clone --depth=1 "${{ github.server_url }}/${{ github.repository }}" build + cd build + [ "${{ github.event.pull_request.number }}" = "" ] || (echo "fetching PR ${{ github.event.pull_request.number }}"; git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }} && git checkout "pr-${{ github.event.pull_request.number }}") + echo "configure" + ./configure --prefix=/usr + echo "building" + make + + netbsd: + runs-on: macos-12 + steps: + - name: Bootstrap NetBSD-latest + uses: mario-campos/emulate@v1 + with: + operating-system: netbsd-latest + + - name: Build + run: | + git clone --depth=1 "${{ github.server_url }}/${{ github.repository }}" build + cd build + [ "${{ github.event.pull_request.number }}" = "" ] || (echo "fetching PR ${{ github.event.pull_request.number }}"; git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }} && git checkout "pr-${{ github.event.pull_request.number }}") + echo "configure" + ./configure --prefix=/usr + echo "building" + make