Skip to content

CI: test on more platforms #428

CI: test on more platforms

CI: test on more platforms #428

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
workflow_dispatch:
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: build
permissions:
contents: read
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-12-large, macos-13-large, macos-13-xlarge, macos-14-large, macos-14-xlarge, macos-15-large, macos-15-xlarge, ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@main
with:
ref: master
fetch-depth: 0
- name: Compile in macOS
if: ${{ startsWith( matrix.os, 'macos-' ) }}
run: |
make
sudo ./tests/process_iterator_test
random_file="$(mktemp $(printf 'X%.0s' $(seq 1 255)))"
cp ./tests/process_iterator_test ./tests/${random_file}
echo "./tests/${random_file}"
sudo ./tests/${random_file}
- name: Compile in Ubuntu
if: ${{ startsWith( matrix.os, 'ubuntu-' ) }}
run: |
make LDFLAGS="-static"
sudo ./tests/process_iterator_test
random_file="$(mktemp $(printf 'X%.0s' $(seq 1 255)))"
cp ./tests/process_iterator_test ./tests/${random_file}
echo "./tests/${random_file}"
sudo ./tests/${random_file}
- name: Upload
uses: actions/upload-artifact@main
with:
name: cpulimit-${{ matrix.os }}
path: src/cpulimit
build-FreeBSD:
name: build-FreeBSD
permissions:
contents: read
strategy:
matrix:
osver: ['13.4', '14.1']
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Build in FreeBSD
uses: vmactions/freebsd-vm@v1
with:
release: ${{ matrix.osver }}
usesh: true
prepare: |
pkg install -y lang/gcc gmake sudo
run: |
gmake
sudo ./tests/process_iterator_test
random_file="$(mktemp $(printf 'X%.0s' $(seq 1 255)))"
cp ./tests/process_iterator_test ./tests/${random_file}
echo "./tests/${random_file}"
sudo ./tests/${random_file}
- name: Upload
uses: actions/upload-artifact@main
with:
name: cpulimit-FreeBSD-${{ matrix.osver }}
path: src/cpulimit