mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 17:12:25 -05:00
63 lines
No EOL
2.1 KiB
YAML
63 lines
No EOL
2.1 KiB
YAML
name: Build latest (NetBSD)
|
|
# trigger via either push to selected branches or on manual run
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.ref }}-netbsd
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ghcr.io/cross-rs/x86_64-unknown-netbsd:edge
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install prerequisites
|
|
run: |
|
|
apt-get update
|
|
apt-get -y install zip wget
|
|
- name: Retrieve OpenGL and X11 dev files (64 bit)
|
|
run: |
|
|
mkdir src/netbsd64
|
|
cd src/netbsd64
|
|
wget https://github.com/ClassiCube/rpi-compiling-stuff/raw/main/netbsd64.zip
|
|
unzip netbsd64.zip
|
|
- name: Compile NetBSD builds
|
|
id: compile
|
|
shell: bash
|
|
env:
|
|
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn"
|
|
PLAT64_FLAGS: "-fno-pie -fvisibility=hidden -fcf-protection=none -rdynamic -DCC_BUILD_ICON -I netbsd64/include -L netbsd64/lib -Wl,--unresolved-symbols=ignore-in-shared-libs"
|
|
run: |
|
|
LATEST_FLAG=-DCC_COMMIT_SHA=\"${GITHUB_SHA::9}\"
|
|
echo $LATEST_FLAG
|
|
|
|
cd src
|
|
x86_64-unknown-netbsd-gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.PLAT64_FLAGS }} $LATEST_FLAG -o cc-netbsd64-gl1 -lm -lpthread -lX11 -lXi -lGL -lexecinfo
|
|
|
|
|
|
- uses: ./.github/actions/notify_failure
|
|
if: ${{ always() && steps.compile.outcome == 'failure' }}
|
|
with:
|
|
NOTIFY_MESSAGE: 'Failed to compile NetBSD build(s)'
|
|
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
|
|
|
|
|
|
- uses: ./.github/actions/upload_build
|
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
|
with:
|
|
SOURCE_FILE: 'src/cc-netbsd64-gl1'
|
|
DEST_NAME: 'ClassiCube-NetBSD-64'
|
|
|
|
|
|
- uses: ./.github/actions/notify_success
|
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
|
with:
|
|
DESTINATION_URL: '${{ secrets.NOTIFY_URL }}'
|
|
WORKFLOW_NAME: 'netbsd' |