Skip to content

update imgui

update imgui #16

Workflow file for this run

name: vpinball
on:
push:
env:
VERSION_START_SHA: ea558e7417f6f06fe567d34f0e33792a141b8e64
defaults:
run:
shell: bash
jobs:
version:
name: Version
runs-on: ubuntu-latest
outputs:
revision: ${{ steps.version.outputs.revision }}
version_short: ${{ steps.version.outputs.version_short }}
version_full: ${{ steps.version.outputs.version_full }}
sha7: ${{ steps.version.outputs.sha7 }}
tag: ${{ steps.version.outputs.tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: version
run: |
REVISION=$(git rev-list ${{ env.VERSION_START_SHA }}..HEAD --count)
VERSION_MAJOR=$(grep -Eo "VP_VERSION_MAJOR\s+[0-9]+" src/core/vpversion.h | grep -Eo "[0-9]+")
VERSION_MINOR=$(grep -Eo "VP_VERSION_MINOR\s+[0-9]+" src/core/vpversion.h | grep -Eo "[0-9]+")
VERSION_REV=$(grep -Eo "VP_VERSION_REV\s+[0-9]+" src/core/vpversion.h | grep -Eo "[0-9]+")
VERSION_SHORT="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REV}"
VERSION_FULL="${VERSION_SHORT}.${REVISION}"
SHA7="${GITHUB_SHA::7}"
TAG="${VERSION_SHORT}-${REVISION}-${SHA7}"
echo "revision=${REVISION}" >> $GITHUB_OUTPUT
echo "version_short=${VERSION_SHORT}" >> $GITHUB_OUTPUT
echo "version_full=${VERSION_FULL}" >> $GITHUB_OUTPUT
echo "sha7=${SHA7}" >> $GITHUB_OUTPUT
echo "tag=${TAG}" >> $GITHUB_OUTPUT
dxsdk:
name: DirectX SDK
runs-on: windows-latest
steps:
- id: cache
uses: actions/cache@v4
with:
path: DXSDK
key: cache-dxsdk
- name: Create Cache
if: steps.cache.outputs.cache-hit != 'true'
run: |
curl -sL https://download.microsoft.com/download/a/e/7/ae743f1f-632b-4809-87a9-aa1bb3458e31/DXSDK_Jun10.exe -o DXSDK_Jun10.exe
7z x DXSDK_Jun10.exe DXSDK/Include -otmp
7z x DXSDK_Jun10.exe DXSDK/Lib -otmp
mv tmp/DXSDK DXSDK
rm -fR DXSDK_Jun10.exe tmp
ls -Ra DXSDK
build:
name: Build VPinballX-${{ matrix.config }}-${{ matrix.platform }}
runs-on: windows-2019
needs: [ version, dxsdk ]
strategy:
fail-fast: false
matrix:
platform: [ win-x64, win-x86 ]
config: [ Release, Debug ]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: DXSDK
key: cache-dxsdk
- run: |
perl -i -pe"s/0/${{ needs.version.outputs.revision }}/g" src/core/git_version.h
perl -i -pe"s/unknown/${{ needs.version.outputs.sha7 }}/g" src/core/git_version.h
- name: Build
run: |
export DXSDK_DIR="${GITHUB_WORKSPACE}/DXSDK"
cp build/CMakeLists_dx9-${{ matrix.platform }}.txt CMakeLists.txt
# cmake can't find fxc.exe so copy one into the a directory in the path
cp "/c/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/fxc.exe" /mingw64/bin
if [[ "${{ matrix.platform }}" == "win-x64" ]]; then
cmake -T v141_xp -G "Visual Studio 16 2019" -A x64 -B build
else
cmake -T v141_xp -G "Visual Studio 16 2019" -A Win32 -B build
fi
cmake --build build --config ${{ matrix.config }}
- run: |
mkdir tmp
if [[ "${{ matrix.platform }}" == "win-x64" ]]; then
cp build/${{ matrix.config }}/VPinballX64.exe tmp
else
cp build/${{ matrix.config }}/VPinballX.exe tmp
fi
cp build/${{ matrix.config }}/*.dll tmp
cp -r build/${{ matrix.config }}/assets tmp
cp -r build/${{ matrix.config }}/scripts tmp
cp -r build/${{ matrix.config }}/tables tmp
cp -r build/${{ matrix.config }}/docs tmp
- uses: actions/upload-artifact@v4
with:
name: VPinballX-${{ needs.version.outputs.tag }}-${{ matrix.config }}-${{ matrix.platform }}
path: tmp
build-gl:
name: Build VPinballX_GL-${{ matrix.config }}-${{ matrix.platform }}
runs-on: windows-2022
needs: [ version, dxsdk ]
strategy:
fail-fast: false
matrix:
platform: [ win-x64, win-x86 ]
config: [ Release, Debug ]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: DXSDK
key: cache-dxsdk
- run: |
perl -i -pe"s/0/${{ needs.version.outputs.revision }}/g" src/core/git_version.h
perl -i -pe"s/unknown/${{ needs.version.outputs.sha7 }}/g" src/core/git_version.h
- name: Build
run: |
export DXSDK_DIR="${GITHUB_WORKSPACE}/DXSDK"
cp build/CMakeLists_gl-${{ matrix.platform }}.txt CMakeLists.txt
if [[ "${{ matrix.platform }}" == "win-x64" ]]; then
cmake -G "Visual Studio 17 2022" -A x64 -B build
else
cmake -G "Visual Studio 17 2022" -A Win32 -B build
fi
cmake --build build --config ${{ matrix.config }}
- run: |
mkdir tmp
if [[ "${{ matrix.platform }}" == "win-x64" ]]; then
cp build/${{ matrix.config }}/VPinballX_GL64.exe tmp
else
cp build/${{ matrix.config }}/VPinballX_GL.exe tmp
fi
cp build/${{ matrix.config }}/*.dll tmp
cp -r build/${{ matrix.config }}/assets tmp
cp -r build/${{ matrix.config }}/shaders-${{ needs.version.outputs.version_short }} tmp
cp -r build/${{ matrix.config }}/scripts tmp
cp -r build/${{ matrix.config }}/tables tmp
cp -r build/${{ matrix.config }}/docs tmp
- uses: actions/upload-artifact@v4
with:
name: VPinballX_GL-${{ needs.version.outputs.tag }}-${{ matrix.config }}-${{ matrix.platform }}
path: tmp
build-bgfx:
name: Build VPinballX_BGFX-${{ matrix.config }}-${{ matrix.platform }}
runs-on: windows-2022
needs: [ version, dxsdk ]
strategy:
fail-fast: false
matrix:
platform: [ win-x64, win-x86 ]
config: [ Release, Debug ]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: DXSDK
key: cache-dxsdk
- run: |
perl -i -pe"s/0/${{ needs.version.outputs.revision }}/g" src/core/git_version.h
perl -i -pe"s/unknown/${{ needs.version.outputs.sha7 }}/g" src/core/git_version.h
- name: Build
run: |
export DXSDK_DIR="${GITHUB_WORKSPACE}/DXSDK"
cp build/CMakeLists_bgfx-${{ matrix.platform }}.txt CMakeLists.txt
if [[ "${{ matrix.platform }}" == "win-x64" ]]; then
cmake -G "Visual Studio 17 2022" -A x64 -B build
else
cmake -G "Visual Studio 17 2022" -A Win32 -B build
fi
cmake --build build --config ${{ matrix.config }}
- run: |
mkdir tmp
if [[ "${{ matrix.platform }}" == "win-x64" ]]; then
cp build/${{ matrix.config }}/VPinballX_BGFX64.exe tmp
else
cp build/${{ matrix.config }}/VPinballX_BGFX.exe tmp
fi
cp build/${{ matrix.config }}/*.dll tmp
cp -r build/${{ matrix.config }}/assets tmp
cp -r build/${{ matrix.config }}/shaders-${{ needs.version.outputs.version_short }} tmp
cp -r build/${{ matrix.config }}/scripts tmp
cp -r build/${{ matrix.config }}/tables tmp
cp -r build/${{ matrix.config }}/docs tmp
- uses: actions/upload-artifact@v4
with:
name: VPinballX_BGFX-${{ needs.version.outputs.tag }}-${{ matrix.config }}-${{ matrix.platform }}
path: tmp
build-macos:
name: Build VPinballX_${{ matrix.type }}-macos-${{ matrix.arch }}-${{ matrix.config }}
runs-on: macos-13
needs: [ version ]
strategy:
fail-fast: false
matrix:
type: [ GL, BGFX ]
config: [ Release ]
arch: [ arm64, x64 ]
steps:
- run: |
brew install bison autoconf automake nasm
echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
- uses: actions/checkout@v4
- run: |
if [ "${{ github.repository }}" == "vpinball/vpinball" ]; then
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
echo "${{ secrets.MACOS_CODESIGN_P12 }}" | base64 --decode > certificate.p12
security create-keychain -p "${{ secrets.MACOS_CODESIGN_P12_PASSWORD }}" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "${{ secrets.MACOS_CODESIGN_P12_PASSWORD }}" $KEYCHAIN_PATH
security import certificate.p12 -P "${{ secrets.MACOS_CODESIGN_P12_PASSWORD }}" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security list-keychain -d user -s $KEYCHAIN_PATH
fi
- name: Calculate timestamp
run: |
echo "TIMESTAMP=$(date +%s)" >> $GITHUB_ENV
- uses: actions/cache/restore@v4
with:
path: standalone/macos-${{ matrix.arch }}/external/cache
key: ${{ matrix.type }}-macos-${{ matrix.arch }}-${{ matrix.config }}-external-${{ env.TIMESTAMP }}
restore-keys: |
${{ matrix.type }}-macos-${{ matrix.arch }}-${{ matrix.config }}-external-
- name: Build Deps
run: |
cd standalone/macos-${{ matrix.arch }}
BUILD_TYPE=${{ matrix.config }} ./external.sh
- uses: actions/cache/save@v4
if: ${{ !cancelled() }}
with:
path: standalone/macos-${{ matrix.arch }}/external/cache
key: ${{ matrix.type }}-macos-${{ matrix.arch }}-${{ matrix.config }}-external-${{ env.TIMESTAMP }}
- name: Build
run: |
perl -i -pe"s/0/${{ needs.version.outputs.revision }}/g" src/core/git_version.h
perl -i -pe"s/unknown/${{ needs.version.outputs.sha7 }}/g" src/core/git_version.h
NUM_PROCS=$(sysctl -n hw.ncpu)
TYPE=$(echo "${{ matrix.type }}" | tr '[:upper:]' '[:lower:]')
cp standalone/cmake/CMakeLists_${TYPE}-macos-${{ matrix.arch }}.txt CMakeLists.txt
if [ "${{ github.repository }}" == "vpinball/vpinball" ]; then
cmake -DCMAKE_BUILD_TYPE=${{ matrix.config }} \
-DOPT_CODESIGN=ON \
-DCODESIGN_DEVELOPER_ID="${{ secrets.MACOS_CODESIGN_DEVELOPER_ID }}" \
-DCODESIGN_APPLE_ID="${{ secrets.MACOS_CODESIGN_APPLE_ID }}" \
-DCODESIGN_PASSWORD="${{ secrets.MACOS_CODESIGN_PASSWORD }}" \
-DCODESIGN_TEAM_ID="${{ secrets.MACOS_CODESIGN_TEAM_ID }}" \
-B build/${{ matrix.config }}
else
cmake -DCMAKE_BUILD_TYPE=${{ matrix.config }} -B build/${{ matrix.config }}
fi
cmake --build build/${{ matrix.config }} -- -j${NUM_PROCS}
cd build/${{ matrix.config }}
cpack
- run: |
mkdir tmp
cp build/${{ matrix.config }}/*.dmg tmp
- uses: actions/upload-artifact@v4
with:
name: VPinballX_${{ matrix.type }}-${{ needs.version.outputs.tag }}-${{ matrix.config }}-macos-${{ matrix.arch }}
path: tmp
build-linux:
name: Build VPinballX_${{ matrix.type }}-linux-${{ matrix.arch }}-${{ matrix.config }}
env:
CC: gcc-12
CXX: g++-12
runs-on: ubuntu-22.04
needs: [ version ]
strategy:
fail-fast: false
matrix:
type: [ GL, BGFX ]
config: [ Release ]
arch: [ x64 ]
steps:
- run: |
sudo apt-get update
sudo apt install cmake bison nasm zlib1g-dev libdrm-dev libgbm-dev libglu1-mesa-dev libegl-dev libudev-dev libx11-dev libxrandr-dev
- uses: actions/checkout@v4
- name: Calculate timestamp
run: |
echo "TIMESTAMP=$(date +%s)" >> $GITHUB_ENV
- uses: actions/cache/restore@v4
with:
path: standalone/linux-${{ matrix.arch }}/external/cache
key: ${{ matrix.type }}-linux-${{ matrix.arch }}-${{ matrix.config }}-external-${{ env.TIMESTAMP }}
restore-keys: |
${{ matrix.type }}-linux-${{ matrix.arch }}-${{ matrix.config }}-external-
- name: Build Deps
run: |
cd standalone/linux-${{ matrix.arch }}
BUILD_TYPE=${{ matrix.config }} ./external.sh
- uses: actions/cache/save@v4
if: ${{ !cancelled() }}
with:
path: standalone/linux-${{ matrix.arch }}/external/cache
key: ${{ matrix.type }}-linux-${{ matrix.arch }}-${{ matrix.config }}-external-${{ env.TIMESTAMP }}
- name: Build
run: |
perl -i -pe"s/0/${{ needs.version.outputs.revision }}/g" src/core/git_version.h
perl -i -pe"s/unknown/${{ needs.version.outputs.sha7 }}/g" src/core/git_version.h
NUM_PROCS=$(nproc)
TYPE=$(echo "${{ matrix.type }}" | tr '[:upper:]' '[:lower:]')
cp standalone/cmake/CMakeLists_${TYPE}-linux-${{ matrix.arch }}.txt CMakeLists.txt
cmake -DCMAKE_BUILD_TYPE=${{ matrix.config }} -B build/${{ matrix.config }}
cmake --build build/${{ matrix.config }} -- -j${NUM_PROCS}
- run: |
mkdir tmp
cp build/${{ matrix.config }}/VPinballX_${{ matrix.type }} tmp
cp -a build/${{ matrix.config }}/*.{so,so.*} tmp
cp -r build/${{ matrix.config }}/flexdmd tmp
cp -r build/${{ matrix.config }}/shaders-${{ needs.version.outputs.version_short }} tmp
cp -r build/${{ matrix.config }}/assets tmp
cp -r build/${{ matrix.config }}/scripts tmp
cp -r build/${{ matrix.config }}/tables tmp
cp -r build/${{ matrix.config }}/docs tmp
- run: |
cd tmp
tar -czf ../VPinballX_${{ matrix.type }}-${{ needs.version.outputs.tag }}-${{ matrix.config }}-linux-${{ matrix.arch }}.tar.gz *
- uses: actions/upload-artifact@v4
with:
name: VPinballX_${{ matrix.type }}-${{ needs.version.outputs.tag }}-${{ matrix.config }}-linux-${{ matrix.arch }}
path: VPinballX_${{ matrix.type }}-${{ needs.version.outputs.tag }}-${{ matrix.config }}-linux-${{ matrix.arch }}.tar.gz