Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revamp OpenBSD and Solaris with newer vmactions.
- Loading branch information
Showing
2 changed files
with
61 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,42 @@ | ||
name: C CI on OpenBSD | ||
name: OpenBSD | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: [ master ] | ||
branches: ['**', '!master'] | ||
pull_request_target: | ||
branches: ['master'] | ||
types: | ||
- closed | ||
|
||
jobs: | ||
build: | ||
name: OpenBSD-${{ matrix.config.name }} | ||
# see https://github.com/vmactions/openbsd-vm: must be macos-12 | ||
runs-on: macos-12 | ||
env: | ||
CFLAGS: ${{ matrix.config.cflags }} | ||
NROFF: ${{ matrix.config.nroff }} | ||
build-openbsd: | ||
if: github.event_name == 'push' || github.event.pull_request.merged == true | ||
name: > | ||
${{ matrix.osversion }} | ||
${{ matrix.abi == '64' && ' ' || matrix.abi }} | ||
${{ matrix.nroff == 'nroff' && ' ' || matrix.nroff }} | ||
${{ matrix.nroff == 'no-roff' && 'no-obsolete' || ' ' }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- { | ||
name: "default64", | ||
nroff: "nroff", | ||
cflags: "" | ||
} | ||
- { | ||
name: "no_obsolete64", | ||
nroff: "true", | ||
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED" | ||
} | ||
|
||
osversion: ["7.4", "7.3", "7.2"] | ||
abi: [64] # 32 | ||
nroff: ["mandoc", "no-roff"] | ||
steps: | ||
- name: checkout | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Test in OpenBSD | ||
id: test | ||
uses: vmactions/openbsd-vm@v0 | ||
- name: Build and Test | ||
uses: vmactions/openbsd-vm@v1 | ||
with: | ||
envs: 'CFLAGS NROFF' | ||
release: ${{ matrix.osversion }} | ||
usesh: true | ||
prepare: | | ||
set -e | ||
pkg_add check | ||
run: | | ||
echo "cc -m64 -O2 ${CFLAGS}" > conf-cc | ||
echo "cc -m64 -s" > conf-ld | ||
make it man NROFF=${NROFF} | ||
cd tests | ||
make test | ||
set -e | ||
echo "cc -m${{ matrix.abi }} -O2 ${{ matrix.nroff == 'no-roff' && '-DDEPRECATED_FUNCTIONS_REMOVED' || ' ' }}" > conf-cc | ||
echo "cc -m${{ matrix.abi }} -s" > conf-ld | ||
make -j 2 it man NROFF=${{ matrix.nroff == 'no-roff' && 'true' || matrix.nroff }} | ||
make -j 2 test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,50 @@ | ||
name: C CI on Solaris | ||
name: Solaris | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: [ master ] | ||
branches: ['**', '!master'] | ||
pull_request_target: | ||
branches: ['master'] | ||
types: | ||
- closed | ||
|
||
jobs: | ||
build: | ||
name: Solaris-${{ matrix.config.name }} | ||
# see https://github.com/vmactions/solaris-vm: must be macos-12 | ||
runs-on: macos-12 | ||
env: | ||
CFLAGS: ${{ matrix.config.cflags }} | ||
NROFF: ${{ matrix.config.nroff }} | ||
LIBCHECK_VERSION: "0.15.2" | ||
build-solaris: | ||
if: github.event_name == 'push' || github.event.pull_request.merged == true | ||
name: > | ||
${{ matrix.osversion }} | ||
${{ matrix.abi == '64' && ' ' || matrix.abi }} | ||
${{ matrix.nroff == 'nroff' && ' ' || matrix.nroff }} | ||
${{ matrix.nroff == 'no-roff' && 'no-obsolete' || ' ' }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- { | ||
name: default64, | ||
nroff: nroff, | ||
cflags: "" | ||
} | ||
- { | ||
name: no_obsolete64, | ||
nroff: true, | ||
cflags: "-DDEPRECATED_FUNCTIONS_REMOVED" | ||
} | ||
|
||
osversion: ["11.4"] # "11.4-gcc" | ||
abi: [64] # 32 | ||
nroff: ["nroff", "no-roff"] | ||
libcheck: ["0.15.2"] | ||
steps: | ||
- name: checkout | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Test in Solaris | ||
id: test | ||
uses: vmactions/solaris-vm@v0 | ||
- name: Build and Test | ||
uses: vmactions/solaris-vm@v1 | ||
with: | ||
envs: 'CFLAGS NROFF LIBCHECK_VERSION' | ||
release: ${{ matrix.osversion }} | ||
usesh: true | ||
prepare: | | ||
set -e | ||
pkgutil -y -i gcc4core pkgconfig curl | ||
curl -L -O https://github.com/libcheck/check/releases/download/${LIBCHECK_VERSION}/check-${LIBCHECK_VERSION}.tar.gz | ||
gunzip check-${LIBCHECK_VERSION}.tar.gz | ||
tar -xvf check-${LIBCHECK_VERSION}.tar | ||
cd check-${LIBCHECK_VERSION} | ||
env CFLAGS="-m64" ./configure --prefix=/opt/csw && gmake && gmake install | ||
curl -L -O https://github.com/libcheck/check/releases/download/${{ matrix.libcheck }}/check-${{ matrix.libcheck }}.tar.gz | ||
gunzip check-${{ matrix.libcheck }}.tar.gz | ||
tar -xvf check-${{ matrix.libcheck }}.tar | ||
cd check-${{ matrix.libcheck }} | ||
env CFLAGS="-m${{ matrix.abi }}" ./configure --prefix=/opt/csw && gmake && gmake install | ||
sed -e 's|^Libs: |Libs: -Wl,-R${libdir} |' < /opt/csw/lib/pkgconfig/check.pc > /opt/csw/lib/pkgconfig/check.pc.tmp && mv /opt/csw/lib/pkgconfig/check.pc.tmp /opt/csw/lib/pkgconfig/check.pc | ||
run: | | ||
echo "gcc -m64 -O2 -pipe ${CFLAGS}" > conf-cc | ||
set -e | ||
echo "gcc -m${{ matrix.abi }} -O2 -pipe ${{ matrix.nroff == 'no-roff' && '-DDEPRECATED_FUNCTIONS_REMOVED' || ' ' }}" > conf-cc | ||
sed -e 's|ar cr |ar Scr |g' make-makelib.sh > make-makelib.sh.tmp && mv make-makelib.sh.tmp make-makelib.sh | ||
echo "gcc -m64 -s" > conf-ld | ||
make it man NROFF=${NROFF} | ||
cd tests | ||
echo "gcc -m${{ matrix.abi }} -s" > conf-ld | ||
make it man NROFF=${{ matrix.nroff == 'no-roff' && 'true' || matrix.nroff }} | ||
make test |