Skip to content

Commit

Permalink
Create release packages automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
eXpl0it3r committed May 18, 2024
1 parent 46ce194 commit 147371f
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on: [push, pull_request, workflow_dispatch]
on: workflow_dispatch

concurrency:
group: environment-${{github.ref}}
Expand Down
123 changes: 123 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
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: pwsh
run: |
echo "${{ github.workspace }}\mingw32" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Prepend
- 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 x64 to PATH
# shell: pwsh
# run: |
# echo "${{ github.workspace }}\mingw64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

#- 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

0 comments on commit 147371f

Please sign in to comment.