Skip to content

Create release packages automatically #23

Create release packages automatically

Create release packages automatically #23

Workflow file for this run

name: Release Builds
on: [push, workflow_dispatch]
#on:
# push:
# branches:
# - master
# - 2.6.x
# tags:
# - "**"
# workflow_dispatch: {}
concurrency:
group: nuget-${{github.ref}}
cancel-in-progress: true
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
windows:
name: Windows
runs-on: windows-2022
steps:
- name: Cache MinGW x86
id: mingw-x86-cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/mingw32
key: 14.1.0posix-18.1.5-11.0.1-msvcrt-r1-x86
- name: Install MinGW x86
if: steps.mingw-x86-cache.outputs.cache-hit != 'true'
uses: bwoodsend/setup-winlibs-action@v1
id: winlibs-32
with:
tag: 14.1.0posix-18.1.5-11.0.1-msvcrt-r1
with_clang: false
architecture: 32
destination: ${{ github.workspace }}
add_to_path: false
- name: Cache MinGW x64
id: mingw-x64-cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/mingw64
key: 14.1.0posix-18.1.5-11.0.1-msvcrt-r1-x64
- name: Install MinGW x64
if: steps.mingw-x64-cache.outputs.cache-hit != 'true'
uses: bwoodsend/setup-winlibs-action@v1
id: winlibs-64
with:
tag: 14.1.0posix-18.1.5-11.0.1-msvcrt-r1
with_clang: false
architecture: 64
destination: ${{ github.workspace }}
add_to_path: false
- name: Checkout SFML
uses: actions/checkout@v4
with:
repository: SFML/SFML
ref: 2.6.1
path: SFML
- name: Checkout CSFML
uses: actions/checkout@v4
with:
path: CSFML
- name: Build SFML x86 with VS2022
run: |
cmake -S SFML -B SFML-build-x86-vs -A Win32 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=FALSE -DSFML_USE_STATIC_STD_LIBS=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-x86-vs -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build-x86-vs --config Release --target install
- name: Build CSFML x86 with VS2022
run: |
cmake -S CSFML -B CSFML-build-x86-vs -A Win32 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=TRUE -DSTATIC_STD_LIBS=TRUE -DCSFML_LINK_SFML_STATICALLY=TRUE -DCMAKE_BUILD_TYPE=Release -DSFML_DIR=${{ github.workspace }}/SFML-x86-vs/lib/cmake/SFML -DCMAKE_INSTALL_PREFIX=CSFML-x86-vs -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build-x86-vs --config Release --target install
- name: Build SFML x64 with VS2022
run: |
cmake -S SFML -B SFML-build-x64-vs -A x64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=FALSE -DSFML_USE_STATIC_STD_LIBS=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-x64-vs -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build-x64-vs --config Release --target install
- name: Build CSFML x64 with VS2022
run: |
cmake -S CSFML -B CSFML-build-x64-vs -A x64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=TRUE -DSTATIC_STD_LIBS=TRUE -DCSFML_LINK_SFML_STATICALLY=TRUE -DCMAKE_BUILD_TYPE=Release -DSFML_DIR=${{ github.workspace }}/SFML-x64-vs/lib/cmake/SFML -DCMAKE_INSTALL_PREFIX=CSFML-x64-vs -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build-x64-vs --config Release --target install
- name: Add MinGW x86 to PATH
shell: bash
run: echo "${{ github.workspace }}\mingw32\bin" >> $GITHUB_PATH
- name: Build SFML x86 with MinGW
run: |
cmake -S SFML -B SFML-build-x86-mingw -G "MinGW Makefiles" -DBUILD_SHARED_LIBS=FALSE -DSFML_USE_STATIC_STD_LIBS=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-x86-mingw -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build-x86-mingw --config Release --target install
- name: Build CSFML x86 with MinGW
run: |
cmake -S CSFML -B CSFML-build-x86-mingw -G "MinGW Makefiles" -DBUILD_SHARED_LIBS=TRUE -DSTATIC_STD_LIBS=TRUE -DCSFML_LINK_SFML_STATICALLY=TRUE -DCMAKE_BUILD_TYPE=Release -DSFML_DIR=${{ github.workspace }}/SFML-x86-mingw/lib/cmake/SFML -DCMAKE_INSTALL_PREFIX=CSFML-x86-mingw -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build-x86-mingw --config Release --target install
- name: Add MinGW x86 to PATH
shell: bash
run: echo "${{ github.workspace }}\mingw64\bin" >> $GITHUB_PATH
- name: Build SFML x64 with MinGW
run: |
cmake -S SFML -B SFML-build-x64-mingw -G "MinGW Makefiles" -DBUILD_SHARED_LIBS=FALSE -DSFML_USE_STATIC_STD_LIBS=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-x64-mingw -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build SFML-build-x64-mingw --config Release --target install
- name: Build CSFML x64 with MinGW
run: |
cmake -S CSFML -B CSFML-build-x64-mingw -G "MinGW Makefiles" -DBUILD_SHARED_LIBS=TRUE -DSTATIC_STD_LIBS=TRUE -DCSFML_LINK_SFML_STATICALLY=TRUE -DCMAKE_BUILD_TYPE=Release -DSFML_DIR=${{ github.workspace }}/SFML-x64-mingw/lib/cmake/SFML -DCMAKE_INSTALL_PREFIX=CSFML-x64-mingw -DCMAKE_VERBOSE_MAKEFILE=ON
cmake --build CSFML-build-x64-mingw --config Release --target install