mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-23 09:34:35 -05:00
54 lines
No EOL
2.5 KiB
YAML
54 lines
No EOL
2.5 KiB
YAML
name: Build latest (Windows 64 bit)
|
|
on: [push]
|
|
|
|
concurrency:
|
|
group: ${{ github.ref }}-win64
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
if: github.ref_name == github.event.repository.default_branch
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Compile 64 bit Windows builds
|
|
shell: bash
|
|
id: compile
|
|
env:
|
|
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn"
|
|
WIN64_FLAGS: "-mwindows -nostartfiles -Wl,-emain_real -DCC_NOMAIN"
|
|
run: |
|
|
sudo apt-get -y install gcc-mingw-w64-x86-64
|
|
LATEST_FLAG=-DCC_COMMIT_SHA=\"$(git rev-parse --short "$GITHUB_SHA")\"
|
|
|
|
cp misc/windows/CCicon_64.res src/CCicon_64.res
|
|
cd src
|
|
x86_64-w64-mingw32-gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.WIN64_FLAGS }} -o cc-w64-d3d9.exe CCicon_64.res $LATEST_FLAG -lwinmm -limagehlp
|
|
x86_64-w64-mingw32-gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.WIN64_FLAGS }} -o cc-w64-ogl.exe CCicon_64.res $LATEST_FLAG -DCC_BUILD_MANUAL -DCC_BUILD_WIN -DCC_BUILD_GL -DCC_BUILD_WINGUI -DCC_BUILD_WGL -DCC_BUILD_WINMM -DCC_BUILD_HTTPCLIENT -DCC_BUILD_SCHANNEL -lwinmm -limagehlp -lopengl32
|
|
x86_64-w64-mingw32-gcc *.c ${{ env.COMMON_FLAGS }} ${{ env.WIN64_FLAGS }} -o cc-w64-d3d11.exe CCicon_64.res $LATEST_FLAG -DCC_BUILD_MANUAL -DCC_BUILD_WIN -DCC_BUILD_D3D11 -DCC_BUILD_WINGUI -DCC_BUILD_WGL -DCC_BUILD_WINMM -DCC_BUILD_HTTPCLIENT -DCC_BUILD_SCHANNEL -lwinmm -limagehlp
|
|
|
|
|
|
- uses: ./.github/actions/notify_failure
|
|
if: ${{ always() && steps.compile.outcome == 'failure' }}
|
|
with:
|
|
NOTIFY_MESSAGE: 'Failed to compile 64 bit Windows build'
|
|
WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}'
|
|
|
|
|
|
- uses: ./.github/actions/upload_build
|
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
|
with:
|
|
SOURCE_FILE: 'src/cc-w64-d3d9.exe'
|
|
DEST_NAME: 'ClassiCube-Win64.exe'
|
|
|
|
- uses: ./.github/actions/upload_build
|
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
|
with:
|
|
SOURCE_FILE: 'src/cc-w64-ogl.exe'
|
|
DEST_NAME: 'ClassiCube-Win64-OpenGL.exe'
|
|
|
|
- uses: ./.github/actions/upload_build
|
|
if: ${{ always() && steps.compile.outcome == 'success' }}
|
|
with:
|
|
SOURCE_FILE: 'src/cc-w64-d3d11.exe'
|
|
DEST_NAME: 'ClassiCube-Win64-Direct3D11.exe' |