This repository was archived by the owner on Jun 4, 2026. It is now read-only.
GBC: Fixed HDMA behavior when CPU is halted and then resumes #673
This file contains hidden or 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 Mesen | |
| on: [push] | |
| env: | |
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
| jobs: | |
| windows: | |
| strategy: | |
| matrix: | |
| platform: [ | |
| {netversion: 6.x, targetframework: net6.0, aot: false, singleFile: true, aotString: ""}, | |
| {netversion: 8.x, targetframework: net8.0, aot: false, singleFile: true, aotString: ""}, | |
| {netversion: 8.x, targetframework: net8.0, aot: true, singleFile: false, aotString: " - AoT"} | |
| ] | |
| fail-fast: false | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install .NET Core | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.platform.netversion }} | |
| - name: Setup MSBuild.exe | |
| uses: microsoft/setup-msbuild@v2 | |
| with: | |
| msbuild-architecture: x64 | |
| - name: Restore packages | |
| run: dotnet restore -p:TargetFramework="${{ matrix.platform.targetframework }}" -r win-x64 -p:PublishAot="${{ matrix.platform.aot }}" -p:BuildWithNetFrameworkHostedCompiler=true | |
| - name: Write commit SHA1 to file | |
| uses: ./.github/actions/build-sha1-action | |
| - name: Build Mesen | |
| run: msbuild -nologo -v:d -clp:ForceConsoleColor -m -p:Configuration=Release -p:Platform=x64 -t:Clean,UI -p:TargetFramework="${{ matrix.platform.targetframework }}" | |
| - name: Publish Mesen | |
| run: dotnet publish --no-restore -c Release -p:PublishAot="${{ matrix.platform.aot }}" -p:SelfContained="${{ matrix.platform.aot }}" -p:PublishSingleFile="${{ matrix.platform.singleFile }}" -p:OptimizeUi="true" -p:Platform="Any CPU" -p:TargetFramework="${{ matrix.platform.targetframework }}" -r win-x64 Mesen.sln /p:PublishProfile=UI\Properties\PublishProfiles\Release.pubxml | |
| - name: Upload Mesen | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Mesen (Windows - ${{ matrix.platform.targetframework }}${{ matrix.platform.aotString }}) | |
| path: | | |
| build/TmpReleaseBuild/Mesen.exe | |
| linux: | |
| strategy: | |
| matrix: | |
| compiler: [gcc, clang, clang_aot] | |
| platform: [ | |
| {os: ubuntu-22.04, path: x64}, | |
| {os: ubuntu-22.04-arm, path: arm64} | |
| ] | |
| exclude: | |
| # ARM64 AOT build doesn't seem to work properly (crashes when launched) | |
| - platform: { os: ubuntu-22.04-arm, path: arm64 } | |
| compiler: clang_aot | |
| include: | |
| - compiler: gcc | |
| make_flags: "USE_GCC=true" | |
| - compiler: clang | |
| make_flags: "" | |
| - compiler: clang_aot | |
| make_flags: "USE_AOT=true" | |
| fail-fast: false | |
| runs-on: ${{ matrix.platform.os }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install .NET Core | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.x | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update -qy | |
| sudo apt-get install -qy libsdl2-dev ccache # The compilers are already installed on GitHub's runners. | |
| - name: Setup CCache | |
| uses: ./.github/actions/setup-ccache-action | |
| - name: Write commit SHA1 to file | |
| uses: ./.github/actions/build-sha1-action | |
| # stderr is not detected as a TTY, so diagnostics are by default printed without colours; | |
| # forcing colours makes the log a little nicer to read. | |
| - name: Build Mesen | |
| run: | | |
| make -j$(nproc) -O ${{ matrix.make_flags }} LTO=true STATICLINK=true SYSTEM_LIBEVDEV=false | |
| - name: Upload Mesen | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Mesen (Linux - ${{ matrix.platform.os }} - ${{ matrix.compiler }}) | |
| path: bin/linux-${{ matrix.platform.path }}/Release/linux-${{ matrix.platform.path }}/publish/Mesen | |
| appimage: | |
| strategy: | |
| matrix: | |
| compiler: [clang_appimage] | |
| platform: [ | |
| {os: ubuntu-22.04, name: x64, script: Linux/appimage/appimage.sh}, | |
| {os: ubuntu-22.04-arm, name: ARM64, script: Linux/appimage/appimage-arm64.sh} | |
| ] | |
| runs-on: ${{ matrix.platform.os }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install .NET Core | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.x | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update -qy | |
| sudo apt-get install -qy libsdl2-dev libfuse2 ccache # The compilers are already installed on GitHub's runners. | |
| - name: Setup CCache | |
| uses: ./.github/actions/setup-ccache-action | |
| - name: Write commit SHA1 to file | |
| uses: ./.github/actions/build-sha1-action | |
| - name: Build Mesen (AppImage) | |
| run: | | |
| ${{ matrix.platform.script }} | |
| - name: Upload Mesen (AppImage) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Mesen (Linux ${{ matrix.platform.name }} - AppImage) | |
| path: Mesen.AppImage | |
| macos: | |
| strategy: | |
| matrix: | |
| compiler: [clang, clang_aot] | |
| platform: [ | |
| {os: macos-13, arch: x64}, | |
| {os: macos-14, arch: arm64} | |
| ] | |
| include: | |
| - compiler: clang | |
| make_flags: "" | |
| - compiler: clang_aot | |
| make_flags: "USE_AOT=true" | |
| fail-fast: false | |
| runs-on: ${{ matrix.platform.os }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install .NET Core | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.x | |
| - name: Install dependencies | |
| run: | | |
| brew install sdl2 ccache | |
| - name: Get brew prefix | |
| run: | | |
| echo "brewPrefix=$(brew --prefix)" >> "$GITHUB_ENV" | |
| - name: Setup CCache | |
| uses: ./.github/actions/setup-ccache-action | |
| with: | |
| ccache-path: '${{ env.brewPrefix }}/opt/ccache/libexec' | |
| - name: Write commit SHA1 to file | |
| uses: ./.github/actions/build-sha1-action | |
| # stderr is not detected as a TTY, so diagnostics are by default printed without colours; | |
| # forcing colours makes the log a little nicer to read. | |
| - name: Build Mesen | |
| run: | | |
| ${{ matrix.make_flags }} make -j$(sysctl -n hw.logicalcpu) | |
| - name: Sign binary | |
| env: | |
| APP_NAME: bin/osx-${{ matrix.platform.arch }}/Release/osx-${{ matrix.platform.arch }}/publish/Mesen.app | |
| CERT_DATA: ${{ secrets.MACOS_CERTIFICATE }} | |
| CERT_PASS: ${{ secrets.MACOS_CERTIFICATE_PWD }} | |
| ENTITLEMENTS: UI/Mesen.entitlements | |
| SIGNING_IDENTITY: Mesen | |
| run: | | |
| # Export certs | |
| echo "$CERT_DATA" | base64 --decode > /tmp/certs.p12 | |
| # Create keychain | |
| security create-keychain -p actions macos-build.keychain | |
| security default-keychain -s macos-build.keychain | |
| security unlock-keychain -p actions macos-build.keychain | |
| security set-keychain-settings -t 3600 -u macos-build.keychain | |
| # Import certs to keychain | |
| security import /tmp/certs.p12 -k ~/Library/Keychains/macos-build.keychain -P "$CERT_PASS" -T /usr/bin/codesign -T /usr/bin/productsign | |
| # Key signing | |
| security set-key-partition-list -S apple-tool:,apple: -s -k actions macos-build.keychain | |
| # print identities | |
| security find-identity -v macos-build.keychain | |
| echo "[INFO] Signing app file" | |
| codesign --force --deep --timestamp --keychain macos-build.keychain --options=runtime --entitlements "$ENTITLEMENTS" --sign "$SIGNING_IDENTITY" "$APP_NAME" | |
| - name: Zip Mesen.app | |
| run: | | |
| ditto -c -k --sequesterRsrc --keepParent bin/osx-${{ matrix.platform.arch }}/Release/osx-${{ matrix.platform.arch }}/publish/Mesen.app bin/osx-${{ matrix.platform.arch }}/Release/Mesen.app.zip | |
| - name: Upload Mesen | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Mesen (macOS - ${{ matrix.platform.os }} - ${{ matrix.compiler }}) | |
| path: bin/osx-${{ matrix.platform.arch }}/Release/Mesen.app.zip |