Merge pull request #702 from zerotacg/feature/devcontainer #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build 32-Bit windows client | |
on: | |
push: | |
branches: [ "core4", "feature/*" ] | |
pull_request: | |
branches: [ "core4" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set reusable strings | |
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. | |
id: strings | |
shell: bash | |
run: | | |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
echo "hunter-dir=${{ github.workspace }}/.hunter" >> "$GITHUB_OUTPUT" | |
echo "cmake-version=3.27.9" >> "$GITHUB_OUTPUT" | |
echo "cmake-install-dir=/opt/cmake-3.27.9" >> "$GITHUB_OUTPUT" | |
COMMIT_HASH=${{ github.sha }} | |
echo "version=sha.${COMMIT_HASH:0:8}" >> "$GITHUB_OUTPUT" | |
- name: Dependencies | |
run: | | |
sudo apt update | |
sudo apt install --yes \ | |
libasound2-dev \ | |
libgl1-mesa-dev \ | |
libjack-dev \ | |
libpulse-dev \ | |
libxrandr-dev \ | |
libxrender-dev \ | |
libxxf86vm-dev \ | |
mingw-w64 \ | |
mingw-w64-tools \ | |
ninja-build | |
wget --output-document=/tmp/cmake.sh https://github.com/Kitware/CMake/releases/download/v${{ steps.strings.outputs.cmake-version }}/cmake-${{ steps.strings.outputs.cmake-version }}-linux-x86_64.sh | |
sudo mkdir ${{ steps.strings.outputs.cmake-install-dir }} | |
sudo sh /tmp/cmake.sh --skip-license --prefix=${{ steps.strings.outputs.cmake-install-dir }} | |
sudo ln --symbolic --force ${{ steps.strings.outputs.cmake-install-dir }}/bin/cmake /usr/local/bin/cmake | |
git clone --depth 1 --branch openssl-3.0.12 https://github.com/openssl/openssl.git | |
cd openssl | |
./Configure mingw --cross-compile-prefix=i686-w64-mingw32- --prefix=/usr/i686-w64-mingw32 | |
make | |
sudo make install | |
- name: Cache Hunter Dependencies | |
uses: actions/[email protected] | |
with: | |
path: ${{ steps.strings.outputs.hunter-dir }} | |
key: ubuntu-latest-hunter-cache | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: > | |
cmake --version; | |
cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
-G Ninja | |
-DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/CMakeModules/toolchain-mingw.cmake | |
-DCMAKE_CONFIGURATION_TYPES=Release | |
-DFINAL_VERSION=OFF | |
-DHUNTER_CONFIGURATION_TYPES=Release | |
-DHUNTER_ENABLED=ON | |
-DHUNTER_ROOT=${{ steps.strings.outputs.hunter-dir }} | |
-DWITH_DRIVER_OPENAL=ON | |
-DWITH_DRIVER_OPENGL=ON | |
-DWITH_INSTALL_LIBRARIES=OFF | |
-DWITH_NEL_SAMPLES=OFF | |
-DWITH_NEL_TESTS=OFF | |
-DWITH_NEL_TOOLS=OFF | |
-DWITH_RYZOM_CLIENT=ON | |
-DWITH_RYZOM_SERVER=OFF | |
-DWITH_RYZOM_TOOLS=OFF | |
-S ${{ github.workspace }} | |
- name: Build | |
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ryzom-client-win32-${{ steps.strings.outputs.version }} | |
path: ${{ steps.strings.outputs.build-output-dir }}/bin |