Skip to content

Commit

Permalink
add freebsd to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 committed Jan 15, 2025
1 parent 380b6bc commit 99fcc3e
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,51 @@ jobs:
name: plugin-macos-${{ matrix.arch }}
path: ./cosmotop-macos-${{ matrix.arch }}.*

build_freebsd_plugin:
name: Build plugin FreeBSD ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [x86_64, aarch64]

steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Start VM
uses: vmactions/freebsd-vm@v1
with:
sync: nfs
arch: ${{ matrix.arch }}
release: 13.3
prepare: |
pkg install -y cmake
- name: Build plugin
shell: freebsd {0}
run: |
cd ${{ github.workspace }}
cmake -B build -DTARGET=plugin
cmake --build build --parallel 4
cp build/libcosmotop.so ${{ github.workspace }}/cosmotop-freebsd-${{ matrix.arch }}.so
- name: Upload plugin
uses: actions/upload-artifact@v4
with:
name: plugin-freebsd-${{ matrix.arch }}
path: ./cosmotop-freebsd-${{ matrix.arch }}.so

bundle:
name: Bundle plugins with cosmotop
runs-on: ubuntu-latest
needs:
- build
- build_linux_plugin
- build_macos_plugin
- build_freebsd_plugin

steps:
- name: Checkout
Expand Down Expand Up @@ -172,6 +210,8 @@ jobs:
sudo cp /tmp/cosmotop-plugin/cosmotop-linux-aarch64.so /zip/
sudo cp /tmp/cosmotop-plugin/cosmotop-macos-x86_64.exe /zip/
sudo cp /tmp/cosmotop-plugin/cosmotop-macos-aarch64.dylib /zip/
sudo cp /tmp/cosmotop-plugin/cosmotop-freebsd-x86_64.so /zip/
sudo cp /tmp/cosmotop-plugin/cosmotop-freebsd-aarch64.so /zip/
cd /zip
zip ${{ github.workspace }}/cosmotop.com *
Expand Down

0 comments on commit 99fcc3e

Please sign in to comment.