Skip to content

Refactor GuiScrollingBanner (#2665) #3710

Refactor GuiScrollingBanner (#2665)

Refactor GuiScrollingBanner (#2665) #3710

Workflow file for this run

---
name: CI/CD
on:
push:
branches:
- master
pull_request:
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
steps:
- name: Update apt index
run: sudo apt-get update -qq
- name: Install SDL2
run: sudo apt-get install libsdl2-dev
- name: Checkout EmptyEpsilon
uses: actions/checkout@v2
- name: Build and test
run: docker/build.sh
windows-cross:
name: Windows (Cross-Compile)
runs-on: ubuntu-latest
steps:
- name: Dependencies
run: |
sudo apt update -qq
sudo apt install build-essential cmake python3-minimal mingw-w64 ninja-build p7zip-full
- name: SeriousProton Checkout
uses: actions/checkout@v2
with:
repository: daid/SeriousProton
path: SeriousProton
ref: master
- name: EmptyEpsilon Checkout
uses: actions/checkout@v2
with:
path: EmptyEpsilon
- name: Build
run: |
mkdir -p _build_win32
cd _build_win32
cmake ../EmptyEpsilon -G Ninja -DCMAKE_MAKE_PROGRAM=ninja -DCMAKE_TOOLCHAIN_FILE=../EmptyEpsilon/cmake/mingw.toolchain -DSERIOUS_PROTON_DIR=../SeriousProton -DWARNING_IS_ERROR=1
ninja package
macos:
if: true
name: MacOS
runs-on: macos-latest
steps:
- name: Dependencies
run: |
brew uninstall --ignore-dependencies cmake || true
brew install cmake ninja sdl2 freetype
- name: SeriousProton Checkout
uses: actions/checkout@v4
with:
repository: daid/SeriousProton
path: SeriousProton
ref: master
- name: EmptyEpsilon Checkout
uses: actions/checkout@v4
with:
path: EmptyEpsilon
- name: Build
run: |
mkdir -p _build_macos
cd _build_macos
cmake ../EmptyEpsilon -G Ninja -DSERIOUS_PROTON_DIR=../SeriousProton -DCMAKE_INSTALL_PREFIX=. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 -DCMAKE_PREFIX_PATH=$(brew --prefix sdl2) -DWARNING_IS_ERROR=1
ninja
ninja install
APP_PATH="./EmptyEpsilon.app"
mkdir -p "$APP_PATH/Contents/Frameworks"
cp $(brew --prefix sdl2)/lib/libSDL2-2.0.0.dylib "$APP_PATH/Contents/Frameworks/"
cp $(brew --prefix freetype)/lib/libfreetype.6.dylib "$APP_PATH/Contents/Frameworks/"
cp $(brew --prefix libpng)/lib/libpng16.16.dylib "$APP_PATH/Contents/Frameworks/" || true
install_name_tool -add_rpath @executable_path/../Frameworks "$APP_PATH/Contents/MacOS/EmptyEpsilon"
install_name_tool -change $(brew --prefix sdl2)/lib/libSDL2-2.0.0.dylib @rpath/libSDL2-2.0.0.dylib "$APP_PATH/Contents/MacOS/EmptyEpsilon"
install_name_tool -change $(brew --prefix freetype)/lib/libfreetype.6.dylib @rpath/libfreetype.6.dylib "$APP_PATH/Contents/MacOS/EmptyEpsilon"
install_name_tool -change $(brew --prefix libpng)/lib/libpng16.16.dylib @rpath/libpng16.16.dylib "$APP_PATH/Contents/Frameworks/libfreetype.6.dylib" || true
codesign --remove-signature "$APP_PATH/Contents/Frameworks/libSDL2-2.0.0.dylib"
codesign --remove-signature "$APP_PATH/Contents/Frameworks/libfreetype.6.dylib"
codesign --remove-signature "$APP_PATH/Contents/Frameworks/libpng16.16.dylib" || true
codesign --remove-signature "$APP_PATH/Contents/MacOS/EmptyEpsilon"
codesign --force --deep --timestamp --sign - "$APP_PATH"
VERSION=$(date +%Y.%m.%d)
echo "VERSION=$VERSION" >> $GITHUB_ENV
mkdir dmg_contents
cp -R "$APP_PATH" dmg_contents/
ln -s /Applications dmg_contents/Applications
hdiutil create -volname EmptyEpsilon -srcfolder dmg_contents -ov -format UDZO "MacOS_EmptyEpsilon_EE-${VERSION}-arm64.dmg"
rm -rf dmg_contents
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: EmptyEpsilon-EE-${{ env.VERSION }}-macOS-arm64
path: _build_macos/MacOS_EmptyEpsilon_EE-*-arm64.dmg
retention-days: 30
windows:
if: false
name: Windows
runs-on: windows-latest
strategy:
matrix:
build_type: [Debug, RelWithDebInfo, Release]
steps:
- name: Dependencies
run: |
$sdl_version = "2.0.16"
$sdl_link = "https://libsdl.org/release/SDL2-devel-$sdl_version-VC.zip"
$sdl_zip = "$env:GITHUB_WORKSPACE/sdl-dev.zip"
(new-object System.Net.WebClient).DownloadFile($sdl_link, $sdl_zip)
Expand-Archive -LiteralPath $sdl_zip -DestinationPath "$env:GITHUB_WORKSPACE/externals"
$sdl_config = @"
set(flavor x86)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(flavor x64)
endif()
set(_SDL2_prefix "`${CMAKE_CURRENT_LIST_DIR}/SDL2-$sdl_version")
add_library(SDL2::SDL2main STATIC IMPORTED)
set_target_properties(SDL2::SDL2main PROPERTIES
IMPORTED_LOCATION "`${_SDL2_prefix}/lib/`${flavor}/SDL2main.lib"
)
add_library(SDL2::SDL2 SHARED IMPORTED)
set_target_properties(SDL2::SDL2 PROPERTIES
IMPORTED_LOCATION "`${_SDL2_prefix}/lib/`${flavor}/SDL2.dll"
IMPORTED_IMPLIB "`${_SDL2_prefix}/lib/`${flavor}/SDL2.lib"
INTERFACE_INCLUDE_DIRECTORIES "`${_SDL2_prefix}/include"
)
target_link_libraries(SDL2::SDL2 INTERFACE SDL2::SDL2main)
"@
Set-Content -Path "$env:GITHUB_WORKSPACE/externals/sdl2-config.cmake" -Value $sdl_config
Get-Content "$env:GITHUB_WORKSPACE/externals/sdl2-config.cmake"
- name: EmptyEpsilon Checkout
uses: actions/checkout@v2
with:
path: EmptyEpsilon
- name: SeriousProton Checkout
uses: actions/checkout@v2
with:
repository: daid/SeriousProton
path: SeriousProton
ref: master
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: >
cmake ../EmptyEpsilon
-G "Visual Studio 17 2022" -A Win32
-DSDL2_DIR:PATH="$env:GITHUB_WORKSPACE/externals"
-DSERIOUS_PROTON_DIR="../SeriousProton"
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config ${{ matrix.build_type }} --target package
luatest:
name: LuaTest
runs-on: ubuntu-latest
steps:
- name: Update apt index
run: sudo apt-get update -qq
- name: Install dependencies
run: sudo apt-get install lua5.3
- name: Checkout EmptyEpsilon
uses: actions/checkout@v2
- name: Test if lua scripts parse
run: find scripts/ -iname "*.lua" | xargs -P 4 -n 1 luac -p