Fix timer0 infinite loop bug (#123) #466
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
name: 'Checks' | |
on: | |
push: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
integration_tests: | |
name: Integration Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Configure | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DARDENS_LIB=1 -DARDENS_LLVM=0 -DARDENS_DEBUGGER=0 -DARDENS_PLAYER=0 -DARDENS_LIBRETRO=0 | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build -j --config Release --target integration_tests | |
- name: Run Tests | |
run: ${{github.workspace}}/build/integration_tests | |
check_web: | |
name: Build (Web) | |
needs: [integration_tests] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- name: Install prerequisites | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libpulse-dev libgl1-mesa-dev | |
- name: Cache LLVM host | |
id: cache-llvm-host | |
uses: actions/cache@v4 | |
with: | |
path: ${{github.workspace}}/build_llvm | |
key: web-cache-llvm-host | |
- name: Build LLVM host | |
if: steps.cache-llvm-host.outputs.cache-hit != 'true' | |
run: | | |
wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.0/llvm-project-16.0.0.src.tar.xz | |
tar -xf llvm-project-16.0.0.src.tar.xz | |
cmake -B ${{github.workspace}}/build_llvm -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLLVM_TARGETS_TO_BUILD=WebAssembly -DLLVM_ENABLE_PROJECTS="clang" -S llvm-project-16.0.0.src/llvm | |
export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) | |
cmake --build ${{github.workspace}}/build_llvm --config ${{env.BUILD_TYPE}} -- llvm-tblgen | |
cmake --build ${{github.workspace}}/build_llvm --config ${{env.BUILD_TYPE}} -- clang-tblgen | |
- name: Set up emsdk | |
run: | | |
git clone https://github.com/emscripten-core/emsdk.git ${{github.workspace}}/emsdk | |
${{github.workspace}}/emsdk/emsdk install 3.1.64 | |
${{github.workspace}}/emsdk/emsdk activate 3.1.64 | |
- name: Cache FetchContent | |
id: cache-fetchcontent | |
uses: actions/cache@v4 | |
with: | |
path: ${{github.workspace}}/build/_deps | |
key: web-cache-fetchcontent | |
- name: Configure (JS) | |
run: | | |
source ${{github.workspace}}/emsdk/emsdk_env.sh | |
emcmake cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLLVM_TABLEGEN=${{github.workspace}}/build_llvm/bin/llvm-tblgen -DCLANG_TABLEGEN=${{github.workspace}}/build_llvm/bin/clang-tblgen -DARDENS_WEB_JS=1 | |
- name: Build (JS) | |
run: | | |
export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target Ardens | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target ArdensPlayer | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target ArdensFlashcart | |
mkdir ${{github.workspace}}/Ardens_web_js | |
- name: Create zip file (JS) | |
run: | | |
cp ${{github.workspace}}/build/Ardens.js ${{github.workspace}}/Ardens_web_js | |
cp ${{github.workspace}}/build/ArdensPlayer.js ${{github.workspace}}/Ardens_web_js | |
cp ${{github.workspace}}/src/Ardens.html ${{github.workspace}}/Ardens_web_js/index.html | |
cp ${{github.workspace}}/src/ArdensPlayer.html ${{github.workspace}}/Ardens_web_js/player.html | |
cd ${{github.workspace}}/Ardens_web_js | |
zip -r ${{github.workspace}}/Ardens_web_js.zip * | |
- name: Upload Build Artifact (JS) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifact-web-js | |
path: ${{github.workspace}}/Ardens_web_js.zip | |
- name: Configure (WASM) | |
run: | | |
source ${{github.workspace}}/emsdk/emsdk_env.sh | |
emcmake cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLLVM_TABLEGEN=${{github.workspace}}/build_llvm/bin/llvm-tblgen -DCLANG_TABLEGEN=${{github.workspace}}/build_llvm/bin/clang-tblgen -DARDENS_WEB_JS=0 | |
- name: Build (WASM) | |
run: | | |
export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target Ardens | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target ArdensPlayer | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target ArdensFlashcart | |
mkdir ${{github.workspace}}/Ardens_web_wasm | |
- name: Create zip file (WASM) | |
run: | | |
cp ${{github.workspace}}/build/Ardens.js ${{github.workspace}}/Ardens_web_wasm | |
cp ${{github.workspace}}/build/Ardens.wasm ${{github.workspace}}/Ardens_web_wasm | |
cp ${{github.workspace}}/build/ArdensPlayer.js ${{github.workspace}}/Ardens_web_wasm | |
cp ${{github.workspace}}/build/ArdensPlayer.wasm ${{github.workspace}}/Ardens_web_wasm | |
cp ${{github.workspace}}/src/Ardens.html ${{github.workspace}}/Ardens_web_wasm/index.html | |
cp ${{github.workspace}}/src/ArdensPlayer.html ${{github.workspace}}/Ardens_web_wasm/player.html | |
cd ${{github.workspace}}/Ardens_web_wasm | |
zip -r ${{github.workspace}}/Ardens_web_wasm.zip * | |
- name: Upload Build Artifact (WASM) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifact-web-wasm | |
path: ${{github.workspace}}/Ardens_web_wasm.zip | |
- name: Pre-Deploy | |
run: | | |
cp ${{github.workspace}}/src/live_Ardens.html ${{github.workspace}}/Ardens_web_wasm/index.html | |
cp ${{github.workspace}}/src/live_ArdensPlayer.html ${{github.workspace}}/Ardens_web_wasm/player.html | |
cp ${{github.workspace}}/src/live_ArdensFlashcart.html ${{github.workspace}}/Ardens_web_wasm/flashcart.html | |
cp ${{github.workspace}}/build/ArdensFlashcart.js ${{github.workspace}}/Ardens_web_wasm | |
cp ${{github.workspace}}/build/ArdensFlashcart.wasm ${{github.workspace}}/Ardens_web_wasm | |
cp ${{github.workspace}}/src/boot/flashcart.zip ${{github.workspace}}/Ardens_web_wasm | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
clean: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
folder: ${{github.workspace}}/Ardens_web_wasm | |
target-folder: staging/${{ steps.extract_branch.outputs.branch }} | |
check_linux: | |
name: Build (Linux) | |
needs: [integration_tests] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Install prerequisites | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libfuse2 | |
- name: Cache FetchContent | |
id: cache-fetchcontent | |
uses: actions/cache@v4 | |
with: | |
path: _deps | |
key: windows_x86-cache-fetchcontent | |
- name: HBB Build | |
run: bash cmake/build_hbb.sh | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifact-linux-x64 | |
path: "build/Ardens_linux_x64.zip" | |
check_windows_x86: | |
name: Build (Windows x86) | |
needs: [integration_tests] | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Cache FetchContent | |
id: cache-fetchcontent | |
uses: actions/cache@v4 | |
with: | |
path: ${{github.workspace}}/build/_deps | |
key: windows_x86-cache-fetchcontent | |
- name: Configure | |
run: cmake -D CMAKE_SYSTEM_VERSION=10.0.26100.0 -B ${{github.workspace}}/build -A Win32 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: | | |
cmake --build ${{github.workspace}}/build -j --config ${{env.BUILD_TYPE}} --target Ardens | |
cmake --build ${{github.workspace}}/build -j --config ${{env.BUILD_TYPE}} --target ArdensPlayer | |
cmake -B ${{github.workspace}}/build -A Win32 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DARDENS_LIBRETRO=1 | |
cmake --build ${{github.workspace}}/build -j --config ${{env.BUILD_TYPE}} --target ardens_libretro | |
cmake -E copy "${{github.workspace}}/build/${{env.BUILD_TYPE}}/Ardens.exe" "Ardens.exe" | |
cmake -E copy "${{github.workspace}}/build/${{env.BUILD_TYPE}}/ArdensPlayer.exe" "ArdensPlayer.exe" | |
cmake -E copy "${{github.workspace}}/build/${{env.BUILD_TYPE}}/ardens_libretro.dll" "ardens_libretro.dll" | |
cmake -E tar "cfv" "Ardens_windows_x86.zip" --format=zip "Ardens.exe" "ArdensPlayer.exe" "ardens_libretro.dll" | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifact-windows-x86 | |
path: "Ardens_windows_x86.zip" | |
check_windows_x64: | |
name: Build (Windows x64) | |
needs: [integration_tests] | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Cache FetchContent | |
id: cache-fetchcontent | |
uses: actions/cache@v4 | |
with: | |
path: ${{github.workspace}}/build/_deps | |
key: windows_x64-cache-fetchcontent | |
- name: Configure | |
run: cmake -D CMAKE_SYSTEM_VERSION=10.0.26100.0 -B ${{github.workspace}}/build -A x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: | | |
cmake --build ${{github.workspace}}/build -j --config ${{env.BUILD_TYPE}} --target Ardens | |
cmake --build ${{github.workspace}}/build -j --config ${{env.BUILD_TYPE}} --target ArdensPlayer | |
cmake -B ${{github.workspace}}/build -A x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DARDENS_LIBRETRO=1 | |
cmake --build ${{github.workspace}}/build -j --config ${{env.BUILD_TYPE}} --target ardens_libretro | |
cmake -E copy "${{github.workspace}}/build/${{env.BUILD_TYPE}}/Ardens.exe" "Ardens.exe" | |
cmake -E copy "${{github.workspace}}/build/${{env.BUILD_TYPE}}/ArdensPlayer.exe" "ArdensPlayer.exe" | |
cmake -E copy "${{github.workspace}}/build/${{env.BUILD_TYPE}}/ardens_libretro.dll" "ardens_libretro.dll" | |
cmake -E tar "cfv" "Ardens_windows_x64.zip" --format=zip "Ardens.exe" "ArdensPlayer.exe" "ardens_libretro.dll" | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifact-windows-x64 | |
path: "Ardens_windows_x64.zip" | |
check_macos_x64: | |
name: Build (MacOS x64) | |
needs: [integration_tests] | |
runs-on: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Cache FetchContent | |
id: cache-fetchcontent | |
uses: actions/cache@v4 | |
with: | |
path: ${{github.workspace}}/build/_deps | |
key: macos_x64-cache-fetchcontent | |
- name: Configure | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
- name: Build | |
run: | | |
export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.logicalcpu) | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target Ardens | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target ArdensPlayer | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DARDENS_LIBRETRO=1 | |
cmake --build ${{github.workspace}}/build -j --config ${{env.BUILD_TYPE}} --target ardens_libretro | |
mkdir Ardens_macos | |
cmake -E copy_directory "${{github.workspace}}/build/Ardens.app" "Ardens_macos/Ardens.app" | |
cmake -E copy_directory "${{github.workspace}}/build/ArdensPlayer.app" "Ardens_macos/ArdensPlayer.app" | |
cmake -E copy "${{github.workspace}}/build/ardens_libretro.dylib" "Ardens_macos/ardens_libretro.dylib" | |
hdiutil create -fs JHFS+ -format UDZO "Ardens_macos_x64.dmg" -srcfolder Ardens_macos | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifact-macos-x64 | |
path: "Ardens_macos_x64.dmg" | |
check_macos_arm64: | |
name: Build (MacOS arm64) | |
needs: [integration_tests] | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Cache LLVM host | |
id: cache-llvm-host | |
uses: actions/cache@v4 | |
with: | |
path: ${{github.workspace}}/build_llvm | |
key: macos-arm64-cache-llvm-host | |
- name: Build LLVM host | |
if: steps.cache-llvm-host.outputs.cache-hit != 'true' | |
run: | | |
wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.0/llvm-project-16.0.0.src.tar.xz | |
tar -xf llvm-project-16.0.0.src.tar.xz | |
cmake -B ${{github.workspace}}/build_llvm -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLLVM_ENABLE_PROJECTS="clang" -S llvm-project-16.0.0.src/llvm | |
export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.logicalcpu) | |
cmake --build ${{github.workspace}}/build_llvm --config ${{env.BUILD_TYPE}} -- llvm-tblgen | |
cmake --build ${{github.workspace}}/build_llvm --config ${{env.BUILD_TYPE}} -- clang-tblgen | |
- name: Cache FetchContent | |
id: cache-fetchcontent | |
uses: actions/cache@v4 | |
with: | |
path: ${{github.workspace}}/build/_deps | |
key: macos_arm64-cache-fetchcontent | |
- name: Configure | |
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLLVM_TABLEGEN=${{github.workspace}}/build_llvm/bin/llvm-tblgen -DCLANG_TABLEGEN=${{github.workspace}}/build_llvm/bin/clang-tblgen | |
- name: Build | |
run: | | |
export CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.logicalcpu) | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target Ardens | |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target ArdensPlayer | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DARDENS_LIBRETRO=1 | |
cmake --build ${{github.workspace}}/build -j --config ${{env.BUILD_TYPE}} --target ardens_libretro | |
mkdir Ardens_macos | |
cmake -E copy_directory "${{github.workspace}}/build/Ardens.app" "Ardens_macos/Ardens.app" | |
cmake -E copy_directory "${{github.workspace}}/build/ArdensPlayer.app" "Ardens_macos/ArdensPlayer.app" | |
cmake -E copy "${{github.workspace}}/build/ardens_libretro.dylib" "Ardens_macos/ardens_libretro.dylib" | |
hdiutil create -fs JHFS+ -format UDZO "Ardens_macos_arm64.dmg" -srcfolder Ardens_macos | |
- name: Upload Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifact-macos-arm64 | |
path: "Ardens_macos_arm64.dmg" |