btop/.github/workflows/continuous-build-freebsd.yml

61 lines
1.5 KiB
YAML
Raw Normal View History

2022-11-06 03:39:53 +01:00
name: Continuous Build FreeBSD
on:
workflow_dispatch:
push:
branches:
- main
tags-ignore:
- '*.*'
paths:
- 'src/**'
- '!src/linux/**'
- '!src/osx/**'
- 'include/**'
- 'Makefile'
- '.github/workflows/continuous-build-freebsd.yml'
pull_request:
branches:
- main
paths:
- 'src/**'
- '!src/linux/**'
- '!src/osx/**'
- 'include/**'
- 'Makefile'
- '.github/workflows/continuous-build-freebsd.yml'
jobs:
build-freebsd:
runs-on: ubuntu-22.04
timeout-minutes: 20
strategy:
matrix:
compiler: ["clang++", "g++"]
2022-11-06 03:39:53 +01:00
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
2022-11-06 03:39:53 +01:00
- name: Compile
uses: vmactions/freebsd-vm@v1
2022-11-06 03:39:53 +01:00
with:
release: '14.0'
2022-11-06 04:19:50 +01:00
usesh: true
2022-11-06 03:39:53 +01:00
prepare: |
pkg install -y gmake gcc coreutils git
git config --global --add safe.directory /home/runner/work/btop/btop
2022-11-06 03:39:53 +01:00
run: |
CXX=${{ matrix.compiler }} gmake STATIC=true STRIP=true
2022-11-06 04:03:37 +01:00
GIT_HASH=$(git rev-parse --short "$GITHUB_SHA")
COMPILER=$(echo ${{ matrix.compiler }} | sed 's/clang++/llvm/' | sed 's/g++/gcc/')
mv bin/btop bin/btop-"$COMPILER"-"$GIT_HASH"
2022-11-06 04:03:37 +01:00
ls -alh bin
2022-11-06 03:39:53 +01:00
- uses: actions/upload-artifact@v3
with:
name: btop-x86_64-freebsd-14
2022-11-06 04:03:37 +01:00
path: 'bin/*'
if-no-files-found: error