Fixing MSYS2 build - ran into a static Qt issue #682
Workflow file for this run
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
########################################## | |
# BletchMAME Windows MSYS2 Github Action # | |
########################################## | |
name: Windows MSYS2 | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [Debug, Release] | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
# Checks out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
# Install MSYS2 | |
- name: Install MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: MINGW64 | |
update: false | |
release: false | |
install: git parallel p7zip mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-ninja mingw-w64-x86_64-polly mingw-w64-x86_64-mlir mingw-w64-x86_64-clang mingw-w64-x86_64-clang-analyzer mingw-w64-x86_64-clang-tools-extra mingw-w64-x86_64-qt6-static mingw-w64-x86_64-jasper mingw-w64-x86_64-graphite2 mingw-w64-x86_64-pcre2 mingw-w64-x86_64-libpng mingw-w64-x86_64-harfbuzz patch | |
# Cache Dependencies | |
- name: Cache Dependencies | |
id: cache-deps | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-deps | |
with: | |
path: deps/install | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.build_type }}-${{ hashFiles('.github/workflows/windows_msys2.yml', 'scripts/quazip_build_msys2.sh', 'scripts/lzma_build_msys2.sh')}} | |
# Retrieve QuaZip | |
- name: Retrieve QuaZip | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: | | |
git submodule update --init deps/quazip | |
# Retrieve lzma-c-sdk | |
- name: Retrieve lzma-c-sdk | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: | | |
git submodule update --init deps/lzma-c-sdk | |
# Build QuaZip | |
- name: Build QuaZip | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: | | |
sh scripts/quazip_build_msys2.sh | |
# Build lzma-c-sdk | |
- name: Build lzma-c-sdk | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: | | |
sh scripts/lzma_build_msys2.sh -b ${{ matrix.build_type }} | |
# Build BletchMAME | |
- name: Build BletchMAME | |
run: | | |
sh scripts/bletchmame_build_msys2.sh -b ${{ matrix.build_type }} | |
# Validate DLL Imports | |
- name: Validate DLL Imports | |
run: perl scripts/validate_dllimports.pl | |
# Run Unit Tests | |
- name: Run Unit Tests | |
shell: bash | |
run: | | |
./build/msys2/BletchMAME_tests.exe | |
# Run integration testing with actual MAME | |
- name: Run integration testing with actual MAME | |
run: | | |
sh scripts/run_mame_integration_testing.sh | |
# Install PanDoc | |
- name: Install PanDoc | |
shell: bash | |
run: | | |
mkdir -p deps | |
curl -L -f "https://github.com/jgm/pandoc/releases/download/2.10.1/pandoc-2.10.1-windows-x86_64.zip" > deps/pandoc-2.10.1-windows-x86_64.zip | |
7z x deps/pandoc-2.10.1-windows-x86_64.zip -odeps | |
# Generate readme.html | |
- name: Generate readme.html | |
run: deps/pandoc-2.10.1/pandoc.exe README.md -o readme.html | |
# Build MSI - Candle | |
- name: Build MSI - Candle | |
run: /c/program\ files\ \(x86\)/WiX\ Toolset\ v3.11/bin/candle -v bletchmame.wxs -dVERSION=`git describe --tags | perl scripts/process_version.pl` -out bletchmame.wixobj | |
# Build MSI - Light | |
- name: Build MSI - Light | |
run: /c/program\ files\ \(x86\)/WiX\ Toolset\ v3.11/bin/light -v -ext WixUIExtension -ext WixUtilExtension bletchmame.wixobj -out BletchMAME.msi | |
# Prepare Artifacts | |
- name: Prepare Artifacts | |
shell: bash | |
run: | | |
mkdir rel | |
git describe --tags | perl scripts/process_version.pl > rel/version_latest.txt | |
mv BletchMAME.msi rel/BletchMAME_latest.msi | |
7z a rel/BletchMAME_latest.zip ./build/msys2/bin/BletchMAME.exe | |
7z a rel/BletchMAME_latest.zip readme.html | |
7z a rel/BletchMAME_latest.zip plugins | |
# Configure AWS Credentials | |
- name: Configure AWS Credentials | |
if: success() && github.ref == 'refs/heads/master' && matrix.build_type == 'Release' | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
# Deploy Artifacts to S3 | |
- name: Deploy Artifacts to S3 | |
if: success() && github.ref == 'refs/heads/master' && matrix.build_type == 'Release' | |
shell: bash | |
run: aws s3 sync ./rel/ s3://bletchmame-web-dyn/dyn/ --delete | |