From 2e22070ddfc4d84eed2de938d028a09c80f26ae4 Mon Sep 17 00:00:00 2001 From: travisladuke Date: Wed, 26 Jul 2023 13:41:27 -0700 Subject: [PATCH 1/4] Basic Github action to build on linux and mac --- .github/workflows/build.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..8917229 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,16 @@ +name: Build +on: + push: + paths-ignore:: + - "README.md" + +jobs: + build_matrix: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout the repository + uses: actions/checkout@v3.5.3 + - run: make From fc87ec593d0bb37f910745f0aadc83b50f356065 Mon Sep 17 00:00:00 2001 From: travisladuke Date: Wed, 26 Jul 2023 14:05:10 -0700 Subject: [PATCH 2/4] See how the build status badge looks --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a910a51..a03cfb2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # ZeroTier Pylon Proxy layer 5 traffic from your apps to and from your ZeroTier virtual network without installing ZeroTier and without bringing up any new network interfaces. +![Build](https://github.com/zerotier/pylon/actions/workflows/build.yml/badge.svg?branch=main) + ## Build Currently the build process will pull a submodule (which itself pulls submodules), build libzt there, and then link pylon against the resultant `libzt.a` static library. Requires `clang`, and `cmake` to build. From 38e192daf2e43e5f10e5846aca6de01e3e79b111 Mon Sep 17 00:00:00 2001 From: travisladuke Date: Wed, 26 Jul 2023 14:16:36 -0700 Subject: [PATCH 3/4] Build debug and release versions --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8917229..6ab7011 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,8 +9,9 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] + target: [debug, release] runs-on: ${{ matrix.os }} steps: - - name: Checkout the repository + - name: Build ${{ matrix.os }} - ${{ matrix.target }} uses: actions/checkout@v3.5.3 - - run: make + - run: make ${{ matrix.target }} From c8bc1405ae704788a38a0744ff49d5462bcb98e8 Mon Sep 17 00:00:00 2001 From: travisladuke Date: Wed, 26 Jul 2023 14:22:12 -0700 Subject: [PATCH 4/4] add a timeout to build action prevent stuff from getting stuck and using all our minutes. The default timeout is 6 hours or something. --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ab7011..019e856 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,5 +13,6 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Build ${{ matrix.os }} - ${{ matrix.target }} + timeout-minutes: 6 uses: actions/checkout@v3.5.3 - run: make ${{ matrix.target }}