Renderers: Move struct skinSurface_t and skin_t to tr_local.h and cle… #147
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 | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- beta | |
paths-ignore: | |
- '**.md' | |
- '*.txt' | |
- '.gitignore' | |
- 'docs/*' | |
pull_request: | |
branches: | |
- master | |
- beta | |
paths-ignore: | |
- '**.md' | |
- '*.txt' | |
- '.gitignore' | |
- 'docs/*' | |
release: | |
types: [published] | |
env: | |
newline: \\n | |
jobs: | |
msvc: | |
name: Windows ${{ matrix.arch }} ${{ matrix.build_type }} (${{ matrix.portable }}) | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
arch: [x86, x86_64] | |
build_type: [Debug, Release] | |
portable: [Portable, Non-Portable] | |
include: | |
- arch: x86 | |
platform: Win32 | |
- arch: x86_64 | |
platform: x64 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v1.1 | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{ runner.workspace }}/build | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{ runner.workspace }}/build | |
run: | | |
if [ "${{ matrix.portable }}" == "Portable" ]; then | |
OPTIONS="-DCMAKE_BUILD_TYPE=${{ runner.build_type }} -DBuildPortableVersion=ON -DCMAKE_INSTALL_PREFIX=bin" | |
else | |
OPTIONS="-DCMAKE_BUILD_TYPE=${{ runner.build_type }} -DBuildPortableVersion=OFF -DCMAKE_INSTALL_PREFIX=bin" | |
fi | |
cmake $GITHUB_WORKSPACE -A ${{ matrix.platform }} $OPTIONS | |
- name: Get SHORT_SHA | |
id: vars | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Update Version Hash | |
working-directory: ${{ runner.workspace }}/EternalJK/codemp/cgame | |
shell: bash | |
run: | | |
sed -i 's/Your client version of the mod was/Your build revision is ${{ steps.vars.outputs.sha_short }} ${{ env.newline }}Your client version of the mod was/' cg_consolecmds.c | |
- name: Build | |
working-directory: ${{ runner.workspace }}/build | |
shell: bash | |
run: cmake --build . --config ${{ matrix.build_type }} | |
- name: Install | |
if: ${{ matrix.build_type == 'Release' }} | |
working-directory: ${{ runner.workspace }}/build | |
shell: bash | |
run: cmake --install . --config ${{ matrix.build_type }} | |
- uses: actions/upload-artifact@v3 | |
if: ${{ matrix.build_type == 'Release' }} | |
with: | |
name: EternalJK-windows-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }} | |
path: ${{ runner.workspace }}/build/bin | |
if-no-files-found: error | |
ubuntu: | |
name: Ubuntu ${{ matrix.arch }} ${{ matrix.build_type }} (${{ matrix.portable }}) | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86, x86_64] | |
build_type: [Debug, Release] | |
portable: [Non-Portable] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create Build Environment | |
run: | | |
if [ ${{ matrix.arch }} == "x86" ]; then | |
sudo dpkg --add-architecture i386 | |
sudo apt-get -qq update | |
sudo apt-get -y install aptitude | |
sudo apt-get -y install gcc-multilib g++-multilib ninja-build | |
sudo apt-get -y install --allow-downgrades libpcre2-8-0:i386 libjpeg-dev:i386 libpng-dev:i386 libcurl4-openssl-dev:i386 libgcc-s1:i386 | |
sudo aptitude -y install libglib2.0-dev:i386 libsdl2-dev:i386 | |
else | |
sudo apt-get -qq update | |
sudo apt-get install libjpeg-dev libpng-dev zlib1g-dev libsdl2-dev | |
fi | |
cmake -E make_directory ${{ runner.workspace }}/build | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{ runner.workspace }}/build | |
run: | | |
if [ "${{ matrix.portable }}" == "Portable" ]; then | |
OPTIONS="-DUseInternalLibs=ON -DBuildPortableVersion=ON -DBuildDiscordRichPresence=OFF -DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/install" | |
else | |
OPTIONS="-DUseInternalLibs=OFF -DBuildPortableVersion=OFF -DBuildDiscordRichPresence=OFF -DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/install" | |
fi | |
if [ ${{ matrix.arch }} == "x86" ]; then | |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} $OPTIONS -DCMAKE_TOOLCHAIN_FILE=CMakeModules/Toolchains/linux-i686.cmake | |
else | |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} $OPTIONS | |
fi | |
- name: Get SHORT_SHA | |
id: vars | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Update Version Hash | |
working-directory: ${{ runner.workspace }}/EternalJK/codemp/cgame | |
shell: bash | |
run: | | |
sed -i 's/Your client version of the mod was/Your build revision is ${{ steps.vars.outputs.sha_short }} ${{ env.newline }}Your client version of the mod was/' cg_consolecmds.c | |
- name: Build | |
working-directory: ${{ runner.workspace }}/build | |
shell: bash | |
run: cmake --build . | |
- name: Install | |
if: ${{ matrix.build_type == 'Release' }} | |
working-directory: ${{ runner.workspace }}/build | |
shell: bash | |
run: cmake --install . | |
- name: Create binary archive | |
if: ${{ matrix.build_type == 'Release' }} | |
working-directory: ${{ runner.workspace }}/install/JediAcademy | |
shell: bash | |
run: | | |
if [ ${{ matrix.arch }} == "x86" ]; then | |
chmod +x eternaljk.i386 | |
else | |
chmod +x eternaljk.${{ matrix.arch }} | |
fi | |
tar -czvf EternalJK-linux-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}.tar.gz * | |
- uses: actions/upload-artifact@v3 | |
if: ${{ matrix.build_type == 'Release' }} | |
with: | |
name: EternalJK-linux-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }} | |
path: ${{runner.workspace}}/install/JediAcademy/EternalJK-linux-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}.tar.gz | |
if-no-files-found: error | |
macos: | |
name: macOS ${{ matrix.arch }} ${{ matrix.build_type }} (${{ matrix.portable}}) | |
runs-on: macos-12 | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [x86_64] | |
build_type: [Debug, Release] | |
portable: [Non-Portable] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create Build Environment | |
run: | | |
brew install zlib libjpeg libpng sdl2 | |
cmake -E make_directory ${{ runner.workspace }}/build | |
- name: Configure CMake | |
shell: bash | |
working-directory: ${{ runner.workspace }}/build | |
run: | | |
if [ "${{ matrix.portable }}" == "Portable" ]; then | |
OPTIONS="-DCMAKE_BUILD_TYPE=${{ runner.build_type }} -DUseInternalLibs=ON -DBuildPortableVersion=ON -DBuildDiscordRichPresence=OFF -DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/install" | |
else | |
OPTIONS="-DCMAKE_BUILD_TYPE=${{ runner.build_type }} -DUseInternalLibs=OFF -DBuildPortableVersion=OFF -DBuildDiscordRichPresence=OFF -DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}/install" | |
fi | |
cmake $GITHUB_WORKSPACE $OPTIONS | |
- name: Get SHORT_SHA | |
id: vars | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Update Version Hash | |
working-directory: ${{ runner.workspace }}/EternalJK/codemp/cgame | |
shell: bash | |
run: | | |
sed -i.bak 's/Your client version of the mod was/Your build revision is ${{ steps.vars.outputs.sha_short }} ${{ env.newline }}Your client version of the mod was/' cg_consolecmds.c | |
rm cg_consolecmds.c.bak | |
- name: Build | |
working-directory: ${{ runner.workspace }}/build | |
shell: bash | |
run: cmake --build . | |
- name: Install | |
if: ${{ matrix.build_type == 'Release' }} | |
working-directory: ${{ runner.workspace }}/build | |
shell: bash | |
run: cmake --install . | |
- name: Create binary archive | |
if: ${{ matrix.build_type == 'Release' }} | |
working-directory: ${{ runner.workspace }}/install/JediAcademy | |
shell: bash | |
run: | | |
chmod +x eternaljk.x86_64.app/Contents/MacOS/eternaljk.x86_64 | |
tar -czvf EternalJK-macos-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}.tar.gz * | |
- uses: actions/upload-artifact@v3 | |
if: ${{ matrix.build_type == 'Release' }} | |
with: | |
name: EternalJK-macos-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }} | |
path: ${{ runner.workspace }}/install/JediAcademy/EternalJK-macos-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}.tar.gz | |
if-no-files-found: error | |
create-latest: | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
needs: [msvc, ubuntu, macos] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
- name: Create binary archives | |
run: | | |
7z a -r EternalJK-windows-x86.zip ./EternalJK-windows-x86-Release-Non-Portable/JediAcademy/* '-x!msvcp*.*' '-x!vcruntime*.*' '-x!concrt*.*' | |
mv ./EternalJK-linux-x86-Release-Non-Portable/* EternalJK-linux-x86.tar.gz | |
mv ./EternalJK-linux-x86_64-Release-Non-Portable/* EternalJK-linux-x86_64.tar.gz | |
mv ./EternalJK-macos-x86_64-Release-Non-Portable/* EternalJK-macos-x86_64.tar.gz | |
- name: Create latest build | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
automatic_release_tag: "latest" | |
prerelease: false | |
title: Latest Build | |
files: | | |
*.zip | |
*.tar.gz | |
create-prerelease: | |
if: github.event_name == 'push' && github.ref == 'refs/heads/beta' | |
needs: [msvc, ubuntu, macos] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
- name: Create binary archives | |
run: | | |
7z a -r EternalJK-windows-x86.zip ./EternalJK-windows-x86-Release-Non-Portable/JediAcademy/* '-x!msvcp*.*' '-x!vcruntime*.*' '-x!concrt*.*' | |
mv ./EternalJK-linux-x86-Release-Non-Portable/* ./EternalJK-linux-x86.tar.gz | |
mv ./EternalJK-linux-x86_64-Release-Non-Portable/* ./EternalJK-linux-x86_64.tar.gz | |
mv ./EternalJK-macos-x86_64-Release-Non-Portable/* ./EternalJK-macos-x86_64.tar.gz | |
- name: Create latest build | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
automatic_release_tag: "latest-beta" | |
prerelease: true | |
title: Beta Build | |
files: | | |
*.zip | |
*.tar.gz | |
create-release: | |
if: github.event_name == 'release' | |
needs: [msvc, ubuntu, macos] | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
include: | |
- artifact_dir: EternalJK-windows-x86-Release-Non-Portable/JediAcademy | |
artifact_name: EternalJK-windows-x86.zip | |
zip: true | |
- artifact_dir: EternalJK-linux-x86-Release-Non-Portable | |
artifact_name: EternalJK-linux-x86.tar.gz | |
zip: false | |
- artifact_dir: EternalJK-linux-x86_64-Release-Non-Portable | |
artifact_name: EternalJK-linux-x86_64.tar.gz | |
zip: false | |
- artifact_dir: EternalJK-macos-x86_64-Release-Non-Portable | |
artifact_name: EternalJK-macos-x86_64.tar.gz | |
zip: false | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
- name: Create archive | |
run: | | |
if [ "${{ matrix.zip }}" == "true" ]; then | |
7z a -r ${{ matrix.artifact_name }} ./${{ matrix.artifact_dir }}/* '-x!msvcp*.*' '-x!vcruntime*.*' '-x!concrt*.*' | |
else | |
mv ./${{ matrix.artifact_dir }}/* ${{ matrix.artifact_name }} | |
fi | |
- name: Upload archives | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref }} | |
overwrite: true | |
file: ${{ matrix.artifact_name }} |