From a28e17556e74bb618fc2b6eb74f250b139406cdd Mon Sep 17 00:00:00 2001 From: Shriraj Hegde Date: Sat, 9 Oct 2021 21:17:11 +0530 Subject: [PATCH 1/6] Add workflow for MacOS --- ...s-build.yml => continuous-build-linux.yml} | 0 .github/workflows/continuous-build-macos.yml | 39 +++++++++++++++++++ 2 files changed, 39 insertions(+) rename .github/workflows/{continuous-build.yml => continuous-build-linux.yml} (100%) create mode 100644 .github/workflows/continuous-build-macos.yml diff --git a/.github/workflows/continuous-build.yml b/.github/workflows/continuous-build-linux.yml similarity index 100% rename from .github/workflows/continuous-build.yml rename to .github/workflows/continuous-build-linux.yml diff --git a/.github/workflows/continuous-build-macos.yml b/.github/workflows/continuous-build-macos.yml new file mode 100644 index 0000000..3575b0d --- /dev/null +++ b/.github/workflows/continuous-build-macos.yml @@ -0,0 +1,39 @@ +name: Continuous Build MacOS + +on: + push: + branches: + - OSX + tags-ignore: + - '*.*' + paths: + - 'src/**' + - '!src/linux/**' + - '!src/freebsd/**' + - 'include/**' + - 'Makefile' + - '.github/workflows/*' + +jobs: + build: + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + - name: Install build tools + run: | + git checkout OSX + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + brew install gcc + - name: Compile + run: | + make CXX=g++-11 ARCH=x86_64 STATIC=true + GIT_HASH=$(git rev-parse --short "$GITHUB_SHA") + mv bin/btop bin/btop-x86_64-$GIT_HASH + make distclean + + - uses: actions/upload-artifact@v2 + with: + name: btop-x86_64 + path: 'bin/x86_64*' From 39eb6c396fc31f798d23c21e7f4b313930dca982 Mon Sep 17 00:00:00 2001 From: Shriraj Hegde Date: Sat, 9 Oct 2021 21:26:57 +0530 Subject: [PATCH 2/6] Disable static compilation --- .github/workflows/continuous-build-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-build-macos.yml b/.github/workflows/continuous-build-macos.yml index 3575b0d..7133f00 100644 --- a/.github/workflows/continuous-build-macos.yml +++ b/.github/workflows/continuous-build-macos.yml @@ -28,7 +28,7 @@ jobs: brew install gcc - name: Compile run: | - make CXX=g++-11 ARCH=x86_64 STATIC=true + make CXX=g++-11 ARCH=x86_64 GIT_HASH=$(git rev-parse --short "$GITHUB_SHA") mv bin/btop bin/btop-x86_64-$GIT_HASH make distclean From 02cdd9d759d163519048d24746273e4eda2149d0 Mon Sep 17 00:00:00 2001 From: Shriraj Hegde Date: Sat, 9 Oct 2021 21:30:40 +0530 Subject: [PATCH 3/6] Fix uploading Remove distclean --- .github/workflows/continuous-build-macos.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/continuous-build-macos.yml b/.github/workflows/continuous-build-macos.yml index 7133f00..0c1c322 100644 --- a/.github/workflows/continuous-build-macos.yml +++ b/.github/workflows/continuous-build-macos.yml @@ -31,7 +31,6 @@ jobs: make CXX=g++-11 ARCH=x86_64 GIT_HASH=$(git rev-parse --short "$GITHUB_SHA") mv bin/btop bin/btop-x86_64-$GIT_HASH - make distclean - uses: actions/upload-artifact@v2 with: From e1d6d0a1f224474417078a0a1b98a6c4b5c94a53 Mon Sep 17 00:00:00 2001 From: Shriraj Hegde Date: Sat, 9 Oct 2021 21:36:13 +0530 Subject: [PATCH 4/6] Skip installing gcc via Homebrew Change job name --- .github/workflows/continuous-build-macos.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/continuous-build-macos.yml b/.github/workflows/continuous-build-macos.yml index 0c1c322..6f681ab 100644 --- a/.github/workflows/continuous-build-macos.yml +++ b/.github/workflows/continuous-build-macos.yml @@ -15,7 +15,7 @@ on: - '.github/workflows/*' jobs: - build: + build-osx: runs-on: macos-latest @@ -24,8 +24,6 @@ jobs: - name: Install build tools run: | git checkout OSX - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - brew install gcc - name: Compile run: | make CXX=g++-11 ARCH=x86_64 From 4f94ecc8ad7d7cdb7daed82fd98a5634d723ec6b Mon Sep 17 00:00:00 2001 From: Shriraj Hegde Date: Sat, 9 Oct 2021 21:40:11 +0530 Subject: [PATCH 5/6] Fix upload path --- .github/workflows/continuous-build-macos.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/continuous-build-macos.yml b/.github/workflows/continuous-build-macos.yml index 6f681ab..166b738 100644 --- a/.github/workflows/continuous-build-macos.yml +++ b/.github/workflows/continuous-build-macos.yml @@ -29,8 +29,9 @@ jobs: make CXX=g++-11 ARCH=x86_64 GIT_HASH=$(git rev-parse --short "$GITHUB_SHA") mv bin/btop bin/btop-x86_64-$GIT_HASH + ls -alh bin - uses: actions/upload-artifact@v2 with: name: btop-x86_64 - path: 'bin/x86_64*' + path: 'bin/*' From 6d724d6155bad8c084e4c9bdb1d7dda13543a5ac Mon Sep 17 00:00:00 2001 From: Shriraj Hegde Date: Sat, 9 Oct 2021 21:46:33 +0530 Subject: [PATCH 6/6] Change Upload filename --- .github/workflows/continuous-build-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous-build-macos.yml b/.github/workflows/continuous-build-macos.yml index 166b738..b747e92 100644 --- a/.github/workflows/continuous-build-macos.yml +++ b/.github/workflows/continuous-build-macos.yml @@ -33,5 +33,5 @@ jobs: - uses: actions/upload-artifact@v2 with: - name: btop-x86_64 + name: btop-x86_64-macos path: 'bin/*'