Release v4.5: raw mouse modes 0/1/2, Wine/PH3 path, internal menu RMF… #145
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 and Release | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| if: github.event.inputs.ci-mode != 'manual-skip' | |
| # The job still runs on a standard GitHub-hosted runner, | |
| # but the steps will execute inside the container specified below. | |
| runs-on: ubuntu-latest | |
| # Define the container to use for this job's steps | |
| container: | |
| image: ubuntu:24.10 | |
| steps: | |
| - name: Install Dependencies | |
| run: | | |
| rm -rf /etc/apt/sources.list* /etc/apt/sources.list.d/* /var/lib/apt/lists/* | |
| cat > /etc/apt/sources.list <<'EOF' | |
| deb http://old-releases.ubuntu.com/ubuntu/ oracular main restricted universe multiverse | |
| deb http://old-releases.ubuntu.com/ubuntu/ oracular-updates main restricted universe multiverse | |
| deb http://old-releases.ubuntu.com/ubuntu/ oracular-backports main restricted universe multiverse | |
| deb http://old-releases.ubuntu.com/ubuntu/ oracular-security main restricted universe multiverse | |
| EOF | |
| apt-get update -o Acquire::Check-Valid-Until=false 2>&1 || true | |
| apt-get install -y git build-essential g++-mingw-w64-i686 mingw-w64-i686-dev zip python3 python3-yaml | |
| i686-w64-mingw32-g++-posix --version || (echo "Compiler not found" && exit 1) | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Read Version | |
| id: version | |
| run: | | |
| VERSION=$(cat VERSION | tr -d '\r\n') | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Current SoF Buddy version: $VERSION" | |
| # Combined the two make steps into one for clarity | |
| - name: Compile Code | |
| run: | | |
| make clean | |
| make | |
| - name: Prepare Release | |
| run: | | |
| mkdir -p sof_buddy/funcmaps | |
| cp rsrc/funcmaps/*.json sof_buddy/funcmaps/ | |
| cp rsrc/win_scripts/enable_*.cmd sof_buddy/ | |
| cp rsrc/win_scripts/patch_sof_binary.ps1 sof_buddy/ | |
| cp rsrc/win_scripts/update_from_zip.cmd sof_buddy/ | |
| cp bin/sof_buddy.dll sof_buddy.dll | |
| zip -r release_windows.zip sof_buddy.dll sof_buddy/ | |
| rm -f sof_buddy/*.cmd sof_buddy/*.ps1 | |
| cp rsrc/lin_scripts/enable_*.sh sof_buddy/ | |
| cp rsrc/lin_scripts/patch_sof_binary.sh sof_buddy/ | |
| cp rsrc/lin_scripts/update_from_zip.sh sof_buddy/ | |
| cp rsrc/win_scripts/update_from_zip.cmd sof_buddy/ | |
| zip -r release_linux_wine.zip sof_buddy.dll sof_buddy/ | |
| make clean | |
| make BUILD=xp | |
| rm -f sof_buddy/*.sh | |
| cp rsrc/win_scripts/enable_*.cmd sof_buddy/ | |
| cp rsrc/win_scripts/patch_sof_binary.ps1 sof_buddy/ | |
| cp rsrc/win_scripts/update_from_zip.cmd sof_buddy/ | |
| cp bin/sof_buddy.dll sof_buddy.dll | |
| zip -r release_windows_xp.zip sof_buddy.dll sof_buddy/ | |
| make clean | |
| make BUILD=debug | |
| rm -f sof_buddy/*.cmd sof_buddy/*.ps1 | |
| cp rsrc/win_scripts/enable_*.cmd sof_buddy/ | |
| cp rsrc/win_scripts/patch_sof_binary.ps1 sof_buddy/ | |
| cp rsrc/win_scripts/update_from_zip.cmd sof_buddy/ | |
| cp bin/sof_buddy.dll sof_buddy.dll | |
| zip -r debug_windows.zip sof_buddy.dll sof_buddy/ | |
| make clean | |
| make BUILD=xp-debug | |
| rm -f sof_buddy/*.cmd sof_buddy/*.ps1 | |
| cp rsrc/win_scripts/enable_*.cmd sof_buddy/ | |
| cp rsrc/win_scripts/patch_sof_binary.ps1 sof_buddy/ | |
| cp rsrc/win_scripts/update_from_zip.cmd sof_buddy/ | |
| cp bin/sof_buddy.dll sof_buddy.dll | |
| zip -r debug_windows_xp.zip sof_buddy.dll sof_buddy/ | |
| # The working-directory is not strictly necessary here as it's the default, but it's good for clarity. | |
| working-directory: ${{ github.workspace }} | |
| - name: Upload Windows Release Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-windows-artifact | |
| path: release_windows.zip | |
| - name: Upload Linux Release Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-linux-artifact | |
| path: release_linux_wine.zip | |
| - name: Upload Windows XP Release Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-windows-xp-artifact | |
| path: release_windows_xp.zip | |
| - name: Upload Windows Debug Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: debug-windows-artifact | |
| path: debug_windows.zip | |
| - name: Upload Windows XP Debug Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: debug-windows-xp-artifact | |
| path: debug_windows_xp.zip | |
| # The 'release' job does not need to run in the container. | |
| # It only handles artifacts, so using ubuntu-latest is fine and efficient. | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Download Windows Release Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: release-windows-artifact | |
| path: windows_release | |
| - name: Download Linux Release Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: release-linux-artifact | |
| path: linux_release | |
| - name: Download Windows XP Release Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: release-windows-xp-artifact | |
| path: windows_xp_release | |
| - name: Download Windows Debug Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: debug-windows-artifact | |
| path: windows_debug | |
| - name: Download Windows XP Debug Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: debug-windows-xp-artifact | |
| path: windows_xp_debug | |
| - name: Read Version | |
| id: version | |
| run: | | |
| VERSION=$(cat VERSION | tr -d '\r\n') | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Current SoF Buddy version: $VERSION" | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: v${{ steps.version.outputs.version }}-build${{ github.run_number }} | |
| release_name: Release v${{ steps.version.outputs.version }} (Build ${{ github.run_number }}) | |
| draft: false | |
| prerelease: false | |
| - name: Upload Windows Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: windows_release/release_windows.zip | |
| asset_name: release_windows.zip | |
| asset_content_type: application/zip | |
| - name: Upload Linux Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: linux_release/release_linux_wine.zip | |
| asset_name: release_linux_wine.zip | |
| asset_content_type: application/zip | |
| - name: Upload Windows XP Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: windows_xp_release/release_windows_xp.zip | |
| asset_name: release_windows_xp.zip | |
| asset_content_type: application/zip | |
| - name: Upload Windows Debug Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: windows_debug/debug_windows.zip | |
| asset_name: debug_windows.zip | |
| asset_content_type: application/zip | |
| - name: Upload Windows XP Debug Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: windows_xp_debug/debug_windows_xp.zip | |
| asset_name: debug_windows_xp.zip | |
| asset_content_type: application/zip |