Skip to content

[Android] Enable side-by-side installation of debug builds #6449

[Android] Enable side-by-side installation of debug builds

[Android] Enable side-by-side installation of debug builds #6449

name: Windows MinGW x64
on:
push:
branches:
- master
paths-ignore:
- '*.md'
- 'docs/**'
pull_request:
types: [ opened, synchronize ]
paths-ignore:
- '*.md'
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create Build Environment
run: >
sudo apt-get update &&
sudo apt-get install -y cmake gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 pkg-config-mingw-w64-x86-64 libz-mingw-w64-dev gettext dpkg-dev wget git sudo smpq &&
sudo rm /usr/x86_64-w64-mingw32/lib/libz.dll.a &&
sudo Packaging/windows/mingw-prep64.sh
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=OFF -DCPACK=ON -DCMAKE_TOOLCHAIN_FILE=../CMake/platforms/mingwcc64.toolchain.cmake -DDEVILUTIONX_SYSTEM_BZIP2=OFF -DDEVILUTIONX_STATIC_LIBSODIUM=ON -DDISCORD_INTEGRATION=ON -DSCREEN_READER_INTEGRATION=ON
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: cmake --build build -j $(nproc) --target package
- name: Upload-Package
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: devilutionx_x64.zip
path: build/devilutionx.zip
- name: Move artifacts to new folder and split exe and other data into two folders
if: ${{ !env.ACT && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'diasurgical/devilutionX'}}
working-directory: ${{github.workspace}}
shell: bash
run: mkdir artifacts_dir && unzip build/devilutionx.zip -d artifacts_dir && mkdir artifacts_dir/exe_dir && mv artifacts_dir/devilutionx/devilutionx.exe artifacts_dir/exe_dir && zip -m artifacts_dir/exe_dir/build.zip artifacts_dir/exe_dir/devilutionx.exe && rm artifacts_dir/devilutionx/libTolk.dll
- name: Pushes DLLs and devilutionx.mpq to another repository
if: ${{ !env.ACT && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'diasurgical/devilutionX' }}
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: artifacts_dir/devilutionx/
destination-github-username: 'artifacts-storage'
destination-repository-name: 'devilutionx-artifacts'
target-directory: data
commit-message: "[DATA] ${{ github.event.head_commit.message }}"
target-branch: master
- name: Pushes exe to another repository
if: ${{ !env.ACT && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'diasurgical/devilutionX' }}
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: artifacts_dir/exe_dir
destination-github-username: 'artifacts-storage'
destination-repository-name: 'devilutionx-artifacts'
target-directory: ${{ github.sha }}
commit-message: "[EXE] ${{ github.event.head_commit.message }}"
target-branch: master