Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
remove useless builds
  • Loading branch information
Crystalwarrior authored Jul 21, 2024
1 parent 0e556a2 commit c77e999
Showing 1 changed file with 11 additions and 119 deletions.
130 changes: 11 additions & 119 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,20 @@ jobs:
version:
- 5.15.2
platform:
- gcc_64
- android
- msvc2019
- mingw81_32
- linux
- windows

include:
- platform: gcc_64
- platform: linux
os: ubuntu-latest
target: desktop
make: make

- platform: android
os: ubuntu-20.04
target: android
make: make

- platform: msvc2019
- platform: windows
os: windows-2019
target: desktop
make: nmake

- platform: mingw81_32
os: windows-latest
target: desktop
arch: win32_mingw81
tools: 'tools_mingw,qt.tools.win32_mingw810'
make: mingw32-make

runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@master
Expand All @@ -51,7 +37,7 @@ jobs:
python-version: '3.10'

- name: Add msbuild to PATH
if: matrix.platform == 'msvc2019'
if: matrix.platform == 'windows'
uses: microsoft/setup-msbuild@main

- name: Downgrade Android NDK
Expand All @@ -78,13 +64,8 @@ jobs:
cache: true
cache-key-prefix: qt

- name: Add tools to PATH (MinGW)
if: matrix.platform == 'mingw81_32'
shell: bash
run: echo "$RUNNER_WORKSPACE/Qt/Tools/mingw810_32/bin" >> $GITHUB_PATH

- name: Configure MSVC (Windows)
if: contains(matrix.platform, 'msvc')
if: contains(matrix.platform, 'windows')
uses: ilammy/msvc-dev-cmd@v1

- name: Install QtApng
Expand All @@ -102,7 +83,7 @@ jobs:
- name: Install Windows Discord RPC
if: contains(matrix.os, 'windows')
env:
ARCH: ${{ matrix.platform == 'msvc2019' && '64' || '32'}}
ARCH: ${{ matrix.platform == 'windows' && '64' || '32'}}
shell: bash
run: |
curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-win.zip -o discord_rpc.zip
Expand All @@ -112,27 +93,18 @@ jobs:
cp ./discord-rpc/win${ARCH}-dynamic/include/discord*.h ./include/
- name: Install Linux Discord RPC
if: matrix.platform == 'gcc_64'
if: matrix.platform == 'linux'
run: |
curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-linux.zip -o discord_rpc.zip
unzip discord_rpc.zip
cp ./discord-rpc/linux-dynamic/lib/libdiscord-rpc.so ./lib/
cp ./discord-rpc/linux-dynamic/lib/libdiscord-rpc.so ./bin/
cp ./discord-rpc/linux-dynamic/include/discord*.h ./include/
- name: Install Mac Discord RPC
if: matrix.os == 'macos-latest'
run: |
curl -L https://github.com/discordapp/discord-rpc/releases/download/v3.4.0/discord-rpc-osx.zip -o discord_rpc.zip
unzip discord_rpc.zip
cp ./discord-rpc/osx-dynamic/lib/libdiscord-rpc.dylib ./lib/
cp ./discord-rpc/osx-dynamic/lib/libdiscord-rpc.dylib ./bin/
cp ./discord-rpc/osx-dynamic/include/discord*.h ./include/
- name: Install Windows BASS
if: contains(matrix.os, 'windows')
env:
ARCH: ${{ matrix.platform == 'msvc2019' && '/x64/' || ''}}
ARCH: ${{ matrix.platform == 'windows' && '/x64/' || ''}}
shell: bash
run: |
curl http://www.un4seen.com/files/bass24.zip -o bass.zip
Expand All @@ -151,7 +123,7 @@ jobs:
cp ./bass/${ARCH}bassopus.dll ./bin/
- name: Install Linux BASS
if: matrix.platform == 'gcc_64'
if: matrix.platform == 'linux'
run: |
curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
unzip -d bass -o bass.zip
Expand All @@ -168,56 +140,11 @@ jobs:
cp ./bass/libs/x86_64/libbassopus.so ./lib/
cp ./bass/libs/x86_64/libbassopus.so ./bin/
- name: Install Mac BASS
if: matrix.os == 'macos-latest'
run: |
curl http://www.un4seen.com/files/bass24-osx.zip -o bass.zip
unzip -d bass -o bass.zip
cp ./bass/libbass.dylib ./lib/
cp ./bass/libbass.dylib ./bin/
curl http://www.un4seen.com/files/bassmidi24-osx.zip -o bassmidi.zip
unzip -d bass -o bassmidi.zip
cp ./bass/libbassmidi.dylib ./lib/
cp ./bass/libbassmidi.dylib ./bin/
curl http://www.un4seen.com/files/bassopus24-osx.zip -o bassopus.zip
unzip -d bass -o bassopus.zip
cp ./bass/libbassopus.dylib ./lib/
cp ./bass/libbassopus.dylib ./bin/
- name: Install Android BASS
if: matrix.platform == 'android'
run: |
mkdir -p ./android/libs/armeabi-v7a/
curl http://www.un4seen.com/files/bass24-android.zip -o bass.zip
unzip -o bass.zip -d bass
cp ./bass/libs/armeabi-v7a/libbass.so ./lib/
unzip -o bass.zip "libs/*" -d "./android/libs/"
cp ./bass/libs/armeabi-v7a/libbass.so ./android/libs/armeabi-v7a/
curl http://www.un4seen.com/files/bassmidi24-android.zip -o bassmidi.zip
unzip -d bass -o bassmidi.zip
cp ./bass/libs/armeabi-v7a/libbassmidi.so ./lib/
unzip -o bassmidi.zip "libs/*" -d "./android/libs/"
cp ./bass/libs/armeabi-v7a/libbassmidi.so ./android/libs/armeabi-v7a/
curl http://www.un4seen.com/files/bassopus24-android.zip -o bassopus.zip
unzip -d bass -o bassopus.zip
cp ./bass/libs/armeabi-v7a/libbassopus.so ./lib/
unzip -o bassopus.zip "libs/*" -d "./android/libs/"
cp ./bass/libs/armeabi-v7a/libbassopus.so ./android/libs/armeabi-v7a/
- name: qmake
if: matrix.platform != 'android'
run: |
qmake QMAKE_CXXFLAGS+="-fno-sized-deallocation" DEFINES+=DISCORD CONFIG+=install_ok QT_PLATFORM=${{matrix.platform}}
- name: qmake android
if: matrix.platform == 'android'
run: |
qmake CONFIG+=install_ok QT_PLATFORM=${{matrix.platform}} ANDROID_ABIS="armeabi-v7a"
- name: Copy libssl DLL (Windows)
if: contains(matrix.os, 'windows')
shell: bash
Expand Down Expand Up @@ -247,17 +174,8 @@ jobs:
rm -r bearer
rm -r base
- name: Copy MingW DLL
if: matrix.platform == 'mingw81_32'
working-directory: ${{github.workspace}}/bin/
shell: bash
run: |
cp $RUNNER_WORKSPACE/Qt/Tools/mingw810_32/bin/libgcc_s_dw2-1.dll .
cp $RUNNER_WORKSPACE/Qt/Tools/mingw810_32/bin/libstdc++-6.dll .
cp $RUNNER_WORKSPACE/Qt/Tools/mingw810_32/bin/libwinpthread-1.dll .
- name: Deploy Linux
if: matrix.platform == 'gcc_64'
if: matrix.platform == 'linux'
working-directory: ${{github.workspace}}/bin/
shell: bash
run: |
Expand All @@ -272,32 +190,6 @@ jobs:
rm *.sh
rm Attorney_Online
- name: Deploy Mac
if: matrix.os == 'macos-latest'
working-directory: ${{github.workspace}}/bin/
shell: bash
run: |
macdeployqt Attorney_Online.app
cp ../QtApng/plugins/imageformats/libqapng.dylib ./Attorney_Online.app/Contents/PlugIns/imageformats/
mv *.dylib ./Attorney_Online.app/Contents/Frameworks
install_name_tool -change @loader_path/libbass.dylib @rpath/libbass.dylib ./Attorney_Online.app/Contents/MacOS/Attorney_Online
install_name_tool -change @loader_path/libbassopus.dylib @rpath/libbassopus.dylib ./Attorney_Online.app/Contents/MacOS/Attorney_Online
install_name_tool -change @loader_path/libbassmidi.dylib @rpath/libbassmidi.dylib ./Attorney_Online.app/Contents/MacOS/Attorney_Online
install_name_tool -change @loader_path/libdiscord-rpc.dylib @rpath/libdiscord-rpc.dylib ./Attorney_Online.app/Contents/MacOS/Attorney_Online
install_name_tool -change @loader_path/libqapng.dylib @rpath/libqapng.dylib ./Attorney_Online.app/Contents/MacOS/Attorney_Online
hdiutil create -volname "Attorney_Online" -srcfolder "./Attorney_Online.app" -ov -format UDZO "Attorney_Online.dmg"
rm -r ./Attorney_Online.app/
- name: Deploy Android
if: matrix.platform == 'android'
working-directory: ${{github.workspace}}/
shell: bash
run: |
mkdir -p ./build/libs/armeabi-v7a/
mv ./bin/*.so ./build/libs/armeabi-v7a/
cp ./QtApng/plugins/imageformats/libplugins_imageformats_qapng_armeabi-v7a.so ./build/libs/armeabi-v7a/
androiddeployqt --android-platform android-24 --input android-Attorney_Online-deployment-settings.json --output ./build/ --apk ./bin/AttorneyOnline.apk
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
Expand Down

0 comments on commit c77e999

Please sign in to comment.