From c8d0322c3ad3f161d719e8d7effb567fd4183ac9 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Tue, 2 Jan 2024 16:05:12 +0100 Subject: [PATCH] Add Continuous Build OpenBSD --- .../workflows/continuous-build-freebsd.yml | 2 + .github/workflows/continuous-build-linux.yml | 2 + .github/workflows/continuous-build-macos.yml | 8 ++- .../workflows/continuous-build-openbsd.yml | 58 +++++++++++++++++++ 4 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/continuous-build-openbsd.yml diff --git a/.github/workflows/continuous-build-freebsd.yml b/.github/workflows/continuous-build-freebsd.yml index 041133f..d06190f 100644 --- a/.github/workflows/continuous-build-freebsd.yml +++ b/.github/workflows/continuous-build-freebsd.yml @@ -11,6 +11,7 @@ on: - 'src/**' - '!src/linux/**' - '!src/osx/**' + - '!src/openbsd/**' - 'include/**' - 'Makefile' - '.github/workflows/continuous-build-freebsd.yml' @@ -21,6 +22,7 @@ on: - 'src/**' - '!src/linux/**' - '!src/osx/**' + - '!src/openbsd/**' - 'include/**' - 'Makefile' - '.github/workflows/continuous-build-freebsd.yml' diff --git a/.github/workflows/continuous-build-linux.yml b/.github/workflows/continuous-build-linux.yml index 3ef236c..39de640 100644 --- a/.github/workflows/continuous-build-linux.yml +++ b/.github/workflows/continuous-build-linux.yml @@ -11,6 +11,7 @@ on: - 'src/**' - '!src/osx/**' - '!src/freebsd/**' + - '!src/openbsd/**' - 'include/**' - 'Makefile' - '.github/workflows/continuous-build-linux.yml' @@ -21,6 +22,7 @@ on: - 'src/**' - '!src/osx/**' - '!src/freebsd/**' + - '!src/openbsd/**' - 'include/**' - 'Makefile' - '.github/workflows/continuous-build-linux.yml' diff --git a/.github/workflows/continuous-build-macos.yml b/.github/workflows/continuous-build-macos.yml index 717e9a7..c8915dd 100644 --- a/.github/workflows/continuous-build-macos.yml +++ b/.github/workflows/continuous-build-macos.yml @@ -11,6 +11,7 @@ on: - 'src/**' - '!src/linux/**' - '!src/freebsd/**' + - '!src/openbsd/**' - 'include/**' - 'Makefile' - '.github/workflows/continuous-build-macos.yml' @@ -21,6 +22,7 @@ on: - 'src/**' - '!src/linux/**' - '!src/freebsd/**' + - '!src/openbsd/**' - 'include/**' - 'Makefile' - '.github/workflows/continuous-build-macos.yml' @@ -44,18 +46,18 @@ jobs: with: name: btop-x86_64-macos11-BigSur path: 'bin/*' - + build-macos12: runs-on: macos-12 steps: - uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: latest-stable + xcode-version: latest-stable - uses: actions/checkout@v3 with: submodules: recursive - + - name: Compile run: | make CXX=g++-12 ARCH=x86_64 STATIC=true STRIP=true diff --git a/.github/workflows/continuous-build-openbsd.yml b/.github/workflows/continuous-build-openbsd.yml new file mode 100644 index 0000000..12324cd --- /dev/null +++ b/.github/workflows/continuous-build-openbsd.yml @@ -0,0 +1,58 @@ +name: Continuous Build OpenBSD + +on: + workflow_dispatch: + push: + branches: + - main + tags-ignore: + - '*.*' + paths: + - 'src/**' + - '!src/linux/**' + - '!src/osx/**' + - '!src/freebsd/**' + - 'include/**' + - 'Makefile' + - '.github/workflows/continuous-build-openbsd.yml' + pull_request: + branches: + - main + paths: + - 'src/**' + - '!src/linux/**' + - '!src/osx/**' + - '!src/freebsd/**' + - 'include/**' + - 'Makefile' + - '.github/workflows/continuous-build-openbsd.yml' + +jobs: + build-freebsd: + runs-on: ubuntu-22.04 + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Compile + uses: vmactions/openbsd-vm@v1 + with: + release: '7.4' + usesh: true + prepare: | + pkg_add gmake gcc%11 g++%11 coreutils git + git config --global --add safe.directory /home/runner/work/btop/btop + run: | + gmake CXX=eg++ STATIC=true STRIP=true + GIT_HASH=$(git rev-parse --short "$GITHUB_SHA") + mv bin/btop bin/btop-GCC11-"$GIT_HASH" + ls -alh bin + + - uses: actions/upload-artifact@v3 + with: + name: btop-x86_64-openbsd-7.4 + path: 'bin/*' + if-no-files-found: error +