Skip to content

Commit

Permalink
Merge branch 'dev' into roblar91/JesseTG#38-flipped-hybrid
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseTG authored Oct 17, 2024
2 parents 9c37563 + df4aa0b commit 8d8f2d7
Show file tree
Hide file tree
Showing 33 changed files with 1,029 additions and 428 deletions.
23 changes: 23 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Security Policy

melonDS DS (including the underlying emulator)
is intended for recreational purposes
and should not be used in security-critical environments.

Only the latest release is supported;
_security fixes will not be backported to older releases_.

melonDS DS is only intended to execute code for the hardware it emulates;
any bug that allows it to execute arbitrary code on the host
is a vulnerability and should be reported.

If you discover such a bug, please submit a private vulnerability report
(**not** a public bug)
with a homebrew ROM that demonstrates the issue.

I will share this information with the maintainers of upstream melonDS,
as such a vulnerability would most likely affect them as well.

If you are able to provide a fix,
please do so in the form of a pull request or a patch file;
I will merge and release it as soon as possible.
20 changes: 17 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ jobs:
build-type:
- Debug
- Release
- RelWithDebInfo
runs-on: ${{ inputs.runs-on }}
defaults:
run:
Expand Down Expand Up @@ -171,21 +172,29 @@ jobs:
run: |
pip install -v -r "${{ github.workspace }}/test/requirements.txt"
- name: Download Test Files
- name: Use Cached Test Files
if: ${{ inputs.test-suite }}
id: cache-test-files
uses: actions/cache@v4
with:
path: "${{ github.workspace }}/testfiles"
key: "testfiles"

- name: Download Test Files
if: ${{ inputs.test-suite && steps.cache-test-files.outputs.cache-hit != 'true' }}
uses: actions/checkout@v4
with:
repository: "${{ secrets.TESTFILE_REPO }}"
token: "${{ secrets.TESTFILE_REPO_TOKEN }}"
path: "testfiles"

- name: Prepare Test Files
if: ${{ inputs.test-suite }}
if: ${{ inputs.test-suite && steps.cache-test-files.outputs.cache-hit != 'true' }}
working-directory: "${{ github.workspace }}/testfiles"
shell: bash
run: 7z x "${{ secrets.DSI_NAND_ARCHIVE }}"

- name: Create build environment
- name: Create Build Directory
run: mkdir -vp "${{ env.BUILD_DIR }}"

- name: Configure
Expand All @@ -194,6 +203,7 @@ jobs:
run: |
cmake "${{ github.workspace }}" \
-DCMAKE_BUILD_TYPE="${{ matrix.build-type }}" \
-DTRACY_ENABLE="${{ matrix.build-type == 'RelWithDebInfo' && 'ON' || 'OFF' }}" \
${{ inputs.cmake-args }}
- name: Configure (With Test Suite)
Expand All @@ -202,6 +212,7 @@ jobs:
run: |
cmake "${{ github.workspace }}" \
-DCMAKE_BUILD_TYPE="${{ matrix.build-type }}" \
-DTRACY_ENABLE="${{ matrix.build-type == 'RelWithDebInfo' && 'ON' || 'OFF' }}" \
-DBUILD_TESTING=ON \
-DARM7_BIOS="${{ env.TESTFILE_DIR }}/${{ secrets.ARM7_BIOS }}" \
-DARM9_BIOS="${{ env.TESTFILE_DIR }}/${{ secrets.ARM9_BIOS }}" \
Expand Down Expand Up @@ -242,6 +253,9 @@ jobs:
working-directory: "${{ env.BUILD_DIR }}"
env:
PYTHONUNBUFFERED: 1
# Defining TRACY_NO_INVARIANT_CHECK fixes test suite failures on the macos-13 runner;
# this is fine because we're not taking traces on the CI anyway.
TRACY_NO_INVARIANT_CHECK: 1
run: ctest --exclude-regex example --output-on-failure

- name: Run Test Suite (Linux)
Expand Down
80 changes: 0 additions & 80 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,83 +166,3 @@ jobs:
lib-ext: dylib
cmake-args: --toolchain ./cmake/toolchain/ios.toolchain.cmake -DPLATFORM=TVOS -DDEPLOYMENT_TARGET=14
# Disabled OpenGL on tvOS due to https://github.com/JesseTG/melonds-ds/issues/23

create-release:
name: Create Release
needs: [ windows, macos-x86_64, macos-arm64, linux-x86_64, linux-aarch64, android, ios, tvos ]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Check Out Source
uses: actions/checkout@v4
with:
fetch-depth: 0 # To ensure we have all tags
- name: Get Latest Changelog Version
id: changelog
uses: release-flow/keep-a-changelog-action@v3
with:
command: query
version: latest
- name: Get the Newest Tag
id: newest-tag
run: |
echo "version=`git tag --list "v[0-9]*.[0-9]*.[0-9]*" --sort=-v:refname | head -n1 | cut -c2-`" >> "$GITHUB_OUTPUT"
- name: Download Artifacts
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
uses: actions/download-artifact@v4
with:
path: artifact
- name: Zip Release Artifacts
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
shell: bash
working-directory: artifact
run: |
for file in melondsds_libretro-*-Release; do
zip -r "${file}.zip" "$file"
done
- name: Upload .info File Artifact
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
uses: actions/upload-artifact@v4
with:
name: melondsds_libretro.info
path: artifact/melondsds_libretro-linux-x86_64-Release/cores/melondsds_libretro.info
# The .info file doesn't vary by platform, so we only need to upload one
- name: Create Release
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.RELEASE_TOKEN }}
tag_name: "v${{ steps.changelog.outputs.version }}"
body: "${{ steps.changelog.outputs.release-notes }}"
files: |
artifact/melondsds_libretro-win32-x86_64-Release.zip
artifact/melondsds_libretro-macos-x86_64-Release.zip
artifact/melondsds_libretro-macos-arm64-Release.zip
artifact/melondsds_libretro-linux-x86_64-Release.zip
artifact/melondsds_libretro-linux-arm64-Release.zip
artifact/melondsds_libretro-android-Release.zip
artifact/melondsds_libretro-ios-Release.zip
artifact/melondsds_libretro-tvos-Release.zip
- name: Checkout libretro-super
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
uses: actions/checkout@v4
with:
repository: "libretro/libretro-super"
path: libretro-super

- name: Add Updated .info File
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
run: |
cp -f "${{ github.workspace }}/artifact/melondsds_libretro-linux-x86_64-Release/cores/melondsds_libretro.info" libretro-super/dist/info/melondsds_libretro.info
- name: Open Pull Request
if: "${{ steps.changelog.outputs.version != steps.newest-tag.outputs.version }}"
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.RELEASE_TOKEN }}
path: libretro-super
commit-message: 'Submit melondsds_libretro.info for melonDS DS release v${{ steps.changelog.outputs.version }} on behalf of @${{ github.triggering_actor }}'
title: "Update melonDS DS to ${{ steps.changelog.outputs.version }}"
branch: "melondsds-v${{ steps.changelog.outputs.version }}"
push-to-fork: "${{ github.triggering_actor }}/libretro-super"
94 changes: 94 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Release New Version
on:
workflow_run:
# Run this workflow right after the build succeeds and test pass on the main branch
workflows: ["Build Artifacts"]
types: [completed]
branches:
- main
jobs:
check-release-version:
name: Check Release Version
if: github.ref == 'refs/heads/main' && github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: Check Out Source
uses: actions/checkout@v4
with:
fetch-depth: 0 # To ensure we have all tags
- name: Get Latest Changelog Version
id: changelog
uses: release-flow/keep-a-changelog-action@v3
with:
command: query
version: latest
- name: Get the Newest Tag
id: newest-tag
run: |
echo "newest-tag=`git tag --list "v[0-9]*.[0-9]*.[0-9]*" --sort=-v:refname | head -n1 | cut -c2-`" >> "$GITHUB_OUTPUT"
outputs:
newest-version: ${{ steps.changelog.outputs.version }}
newest-tag: ${{ steps.newest-tag.outputs.version }}
release-notes: ${{ steps.changelog.outputs.release-notes}}

create-release:
name: Create Release
needs: check-release-version
if: "${{ needs.check-release-version.outputs.newest-tag != needs.check-release-version.outputs.newest-version }}"
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: artifact

- name: Zip Release Artifacts
shell: bash
working-directory: artifact
run: |
for file in melondsds_libretro-*-Release; do
zip -r "${file}.zip" "$file"
done
- name: Upload .info File Artifact
uses: actions/upload-artifact@v4
with:
name: melondsds_libretro.info
path: artifact/melondsds_libretro-linux-x86_64-Release/cores/melondsds_libretro.info
# The .info file doesn't vary by platform, so we only need to upload one

- name: Create Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.RELEASE_TOKEN }}
tag_name: "v${{ needs.check-release-version.outputs.newest-version }}"
body: "${{ needs.check-release-version.outputs.release-notes }}"
files: |
artifact/melondsds_libretro-win32-x86_64-Release.zip
artifact/melondsds_libretro-macos-x86_64-Release.zip
artifact/melondsds_libretro-macos-arm64-Release.zip
artifact/melondsds_libretro-linux-x86_64-Release.zip
artifact/melondsds_libretro-linux-arm64-Release.zip
artifact/melondsds_libretro-android-Release.zip
artifact/melondsds_libretro-ios-Release.zip
artifact/melondsds_libretro-tvos-Release.zip
- name: Checkout libretro-super
uses: actions/checkout@v4
with:
repository: "libretro/libretro-super"
path: libretro-super

- name: Add Updated .info File
run: |
cp -f "${{ github.workspace }}/artifact/melondsds_libretro-linux-x86_64-Release/cores/melondsds_libretro.info" libretro-super/dist/info/melondsds_libretro.info
- name: Open Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.RELEASE_TOKEN }}
path: libretro-super
commit-message: 'Submit melondsds_libretro.info for melonDS DS release v${{ needs.check-release-version.outputs.newest-version }} on behalf of @${{ github.triggering_actor }}'
title: "Update melonDS DS to ${{ needs.check-release-version.outputs.newest-version }}"
branch: "melondsds-v${{ needs.check-release-version.outputs.newest-version }}"
push-to-fork: "${{ github.triggering_actor }}/libretro-super"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
CMakeUserPresets.json
Testing
Makefile
cmake_install.cmake
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,29 @@ New features will increment the minor version.
Breaking changes (**except for savestates**) will increment the major version;
a design goal is to avoid a 2.x release for as long as possible.

## [Unreleased]

### Added

- Added `RelWithDebInfo` builds that include Tracy support.
These will be distributed on GitHub for all supported platforms,
starting with this release.
- Added a contributor's guide at `CONTRIBUTING.md`.
[#107](https://github.com/JesseTG/melonds-ds/issues/107)

### Changed

- Moved build instructions from `README.md` to the new `CONTRIBUTING.md`.

### Fixed

- Fixed encrypted NDS ROMs failing to load without any feedback;
loading one without using the native BIOS will now display an error message.
[#228](https://github.com/JesseTG/melonds-ds/issues/228)
- Fixed Blow mode for emulated microphone input not being implemented
despite being available in the core options.
[#187](https://github.com/JesseTG/melonds-ds/issues/187)

## [1.1.7] - 2024-08-20

### Fixed
Expand Down
Loading

0 comments on commit 8d8f2d7

Please sign in to comment.