Loki-Astari Building #363
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 | |
run-name: ${{ github.actor }} Building | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
# windows-latest | |
# windows-2022 | |
# windows-2019 | |
# ubuntu-latest | |
# ubuntu-22.04 | |
# ubuntu-20.04 | |
# ubuntu-18.04 | |
# macos-latest | |
# macos-13 | |
# macos-12 | |
# macos-11 | |
Build_on_Mac: | |
runs-on: macos-latest | |
steps: | |
- run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install vera++ | |
- run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install boost | |
- run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install magic_enum | |
- run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install sdl2 | |
- run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install sdl2_ttf | |
- run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install sdl2_image | |
- uses: actions/checkout@master | |
with: | |
submodules: recursive | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- run: ./configure --disable-colour | |
- run: make | |
- run: make install | |
Build_on_Linux: | |
runs-on: ubuntu-latest | |
steps: | |
- run: g++ --version | |
- run: which g++ | |
- run: sudo apt-get install vera++ | |
- run: sudo apt-get install libboost-all-dev | |
- run: sudo apt-get install libsdl2-dev | |
- run: sudo apt-get install libsdl2-ttf-dev | |
- run: sudo apt-get install libsdl2-image-dev | |
- run: git clone https://github.com/Neargye/magic_enum.git /tmp/magic_enum | |
- uses: actions/checkout@master | |
with: | |
submodules: recursive | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- run: ./configure --enable-dark-mode --with-magicenum-header-only-root=/tmp/magic_enum/include/magic_enum | |
- run: | | |
cat Makefile.config | |
cat third/ThorsStorage/Makefile.config | |
cat third/ThorsStorage/src/ThorsStorage/Makefile | |
- run: make | |
- run: sudo make install | |
Build_on_Windows: | |
runs-on: windows-latest | |
steps: | |
- run: git config --global core.autocrlf input | |
- uses: actions/checkout@master | |
with: | |
submodules: recursive | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
install: >- | |
autoconf | |
automake | |
make | |
git | |
gperf | |
coreutils | |
vim | |
mingw-w64-x86_64-gcc | |
mingw-w64-x86_64-gdb | |
mingw-w64-x86_64-boost | |
mingw-w64-x86_64-libyaml | |
mingw-w64-x86_64-dlfcn | |
- name: GetInfo | |
shell: msys2 {0} | |
run: | | |
uname -a | |
uname -s | |
uname -s | sed 's/-.*//' | |
- name: Clone Magic Enum | |
shell: msys2 {0} | |
run: git clone https://github.com/Neargye/magic_enum.git /tmp/magic_enum | |
- name: Get SDL Dev | |
shell: msys2 {0} | |
run: | | |
wget https://github.com/libsdl-org/SDL/releases/download/release-2.30.3/SDL2-devel-2.30.3-mingw.tar.gz | |
wget https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.22.0/SDL2_ttf-devel-2.22.0-mingw.tar.gz | |
wget https://github.com/libsdl-org/SDL_image/releases/download/release-2.8.2/SDL2_image-devel-2.8.2-mingw.tar.gz | |
tar xvzf SDL2-devel-2.30.3-mingw.tar.gz | |
tar xvzf SDL2_ttf-devel-2.22.0-mingw.tar.gz | |
tar xvzf SDL2_image-devel-2.8.2-mingw.tar.gz | |
export cwd=$(pwd) | |
export arch=i686-w64-mingw32 | |
hard=$(uname --machine) | |
echo "Machine: >${hard}<" | |
if [[ "${hard}" == "x86" ]]; then | |
arch="x86_64-w64-mingw32" | |
fi | |
cp -r SDL2_ttf-2.22.0/${arch}/bin/* SDL2-2.30.3/${arch}/bin/ | |
cp -r SDL2_ttf-2.22.0/${arch}/lib/* SDL2-2.30.3/${arch}/lib/ | |
cp -r SDL2_ttf-2.22.0/${arch}/include/* SDL2-2.30.3/${arch}/include/ | |
cp -r SDL2_image-2.8.2/${arch}/bin/* SDL2-2.30.3/${arch}/bin/ | |
cp -r SDL2_image-2.8.2/${arch}/lib/* SDL2-2.30.3/${arch}/lib/ | |
cp -r SDL2_image-2.8.2/${arch}/include/* SDL2-2.30.3/${arch}/include/ | |
export PATH="${PATH}:${cwd}/SDL2-2.30.3/${arch}/bin" | |
echo "Adding: >${cwd}/SDL2-2.30.3/${arch}/bin<" | |
- uses: actions/checkout@master | |
- name: Configure | |
shell: msys2 {0} | |
env: | |
MSYS: winsymlinks:nativestrict | |
run: ./configure --disable-colour --disable-vera --with-magicenum-header-only-root=/tmp/magic_enum/include/magic_enum --with-yaml-root=/mingw64/ --disable-test-with-locked-file --with-sdl2-prefix=${cwd}/SDL2-2.30.3/${arch} | |
- name: Make | |
shell: msys2 {0} | |
run: make | |
Build_Header_Only_Version: | |
needs: [Build_on_Mac, Build_on_Linux, Build_on_Windows] | |
runs-on: macos-latest | |
#- if: github.ref == 'refs/heads/master' | |
steps: | |
- run: echo "Building Header Only" | |
- run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install vera++ | |
- run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install boost | |
- run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install magic_enum | |
- uses: actions/checkout@master | |
with: | |
submodules: recursive | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- run: ./configure --disable-colour | |
- run: make header-only | |