2023-12-02 12:13:37 +11:00
|
|
|
name: Build latest (Linux 64 bit)
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.ref }}-linux64
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
if: github.ref_name == github.event.repository.default_branch
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
2024-02-18 21:11:40 +11:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-02 12:13:37 +11:00
|
|
|
- name: Compile 64 bit Linux builds
|
|
|
|
shell: bash
|
|
|
|
id: compile
|
|
|
|
env:
|
|
|
|
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn"
|
|
|
|
NIX64_FLAGS: "-no-pie -fno-pie -m64 -fvisibility=hidden -fcf-protection=none -rdynamic -DCC_BUILD_ICON"
|
|
|
|
run: |
|
|
|
|
sudo apt-get -y install libx11-dev libxi-dev libgl1-mesa-dev
|
|
|
|
LATEST_FLAG=-DCC_COMMIT_SHA=\"$(git rev-parse --short "$GITHUB_SHA")\"
|
|
|
|
|
|
|
|
cd src
|
|
|
|
gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.NIX64_FLAGS }} $LATEST_FLAG -o cc-nix64-gl1 -lX11 -lXi -lpthread -lGL -lm -ldl
|
|
|
|
gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.NIX64_FLAGS }} $LATEST_FLAG -DCC_BUILD_GLMODERN -o cc-nix64-gl2 -lX11 -lXi -lpthread -lGL -lm -ldl
|
|
|
|
|
2024-02-18 21:11:40 +11:00
|
|
|
|
2023-12-02 12:13:37 +11:00
|
|
|
- uses: ./.github/actions/notify_failure
|
|
|
|
if: ${{ always() && steps.compile.outcome == 'failure' }}
|
|
|
|
with:
|
|
|
|
NOTIFY_MESSAGE: 'Failed to compile 64 bit Linux build'
|
|
|
|
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
|
|
|
|
|
2024-02-18 21:11:40 +11:00
|
|
|
|
2023-12-02 12:13:37 +11:00
|
|
|
- uses: ./.github/actions/upload_build
|
|
|
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
|
|
|
with:
|
|
|
|
SOURCE_FILE: 'src/cc-nix64-gl1'
|
|
|
|
DEST_NAME: 'ClassiCube-Linux64'
|
|
|
|
|
|
|
|
- uses: ./.github/actions/upload_build
|
|
|
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
|
|
|
with:
|
|
|
|
SOURCE_FILE: 'src/cc-nix64-gl2'
|
|
|
|
DEST_NAME: 'ClassiCube-Linux64-ModernGL'
|