Skip to content

Decompile no0 func_us_801D4E94 and func_us_801D4FCC (#1946) #4210

Decompile no0 func_us_801D4E94 and func_us_801D4FCC (#1946)

Decompile no0 func_us_801D4E94 and func_us_801D4FCC (#1946) #4210

Workflow file for this run

name: Build C code
on:
push:
branches:
- master
paths:
- 'include/**'
- 'src/**'
- 'tools/sotn-assets/**'
- 'cmake/**'
- 'CMakeLists*'
pull_request:
paths:
- 'include/**'
- 'src/**'
- 'tools/sotn-assets/**'
- 'cmake/**'
- 'CMakeLists*'
workflow_dispatch:
jobs:
extract-assets:
# Building and testing cannot work if the repository owner is not Xeeynamo
# due to the missing secrets to clone the CI dependencies
if: github.repository == 'Xeeynamo/sotn-decomp'
runs-on: ubuntu-latest
steps:
- name: Clone main repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Get dependencies
uses: actions/cache@v4
id: get-dependencies
with:
path: 'disks/dependencies'
key: sotn-us-deps
- name: Setting up dependencies
working-directory: disks
run: cat dependencies/* | tar -zxf -
- name: Extract dependencies
run: make extract_disk
- name: Extract game assets
run: |
make update-dependencies
make -j extract
make -j extract_assets
- name: Export assets
uses: actions/upload-artifact@v4
with:
name: assets
path: assets
build-linux:
strategy:
matrix:
compiler: ["clang", "gcc"]
build_type: ["Debug", "RelWithDebInfo"]
sound_engine: ["lle", "custom"]
arch: ["x86_64"]
runs-on: ubuntu-24.04
needs: extract-assets
steps:
- name: Install requirements
run: sudo apt-get update && sudo apt-get install build-essential libsdl2-dev
- name: Install multilib
if: matrix.arch == 'i686'
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install gcc-multilib g++-multilib libsdl2-dev:i386
- name: Clone repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Get assets
uses: actions/download-artifact@v4
with:
name: assets
path: assets
- name: Build assets
run: make -j build_assets
- name: Build
run: |
export PC_FLAGS=""
if [[ "${{ matrix.sound_engine }}" == "lle" ]]; then
export PC_FLAGS="-DWANT_LIBSND_LLE=1"
fi
if [[ "${{ matrix.arch }}" == "i686" ]]; then
export PC_FLAGS="$PC_FLAGS -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32"
fi
export CC=${{ matrix.compiler }}
cmake -B ${{github.workspace}}/pc ${PC_FLAGS} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build ${{github.workspace}}/pc --config ${{ matrix.build_type }}
- name: Test
if: matrix.sound_engine == 'lle'
run: |
${{github.workspace}}/pc/sotn --test sndlib
build-macos:
strategy:
matrix:
build_type: ["Debug", "RelWithDebInfo"]
sound_engine: ["lle", "custom"]
runs-on: macos-latest
needs: extract-assets
steps:
- name: Install requirements
run: brew install SDL2
- name: Install Go
run: |
curl -L -o go.tar.gz https://go.dev/dl/go1.22.4.darwin-amd64.tar.gz
tar -C ~ -xzf go.tar.gz
rm go.tar.gz
- name: Clone repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Get assets
uses: actions/download-artifact@v4
with:
name: assets
path: assets
- name: Build assets
run: make -j build_assets
- name: Build
run: |
export PC_FLAGS=""
if [[ "${{ matrix.sound_engine }}" == "lle" ]]; then
export PC_FLAGS="-DWANT_LIBSND_LLE=1"
fi
cmake -B ${{github.workspace}}/pc ${PC_FLAGS} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
cmake --build ${{github.workspace}}/pc --config ${{ matrix.build_type }}
build-windows:
strategy:
matrix:
build_type: ["Debug", "RelWithDebInfo"]
sound_engine: ["lle", "custom"]
runs-on: windows-latest
needs: extract-assets
steps:
- name: Install requirements
run: |
mkdir C:\temp-sdl2
powershell Invoke-WebRequest 'https://github.com/libsdl-org/SDL/releases/download/release-2.28.5/SDL2-devel-2.28.5-VC.zip' -OutFile C:\temp-sdl2\SDL2-devel-2.28.5-VC.zip
7z x C:\temp-sdl2\SDL2-devel-2.28.5-VC.zip -oC:\temp-sdl2
- name: Clone repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Get assets
uses: actions/download-artifact@v4
with:
name: assets
path: assets
- uses: actions/setup-go@v5
with:
go-version: '^1.22.4'
- name: Build assets
run: |
cd tools/sotn-assets; go install; cd -
$SOTN_ASSETS = (Get-Command sotn-assets).Source
& make -j build_assets SOTNASSETS=$SOTN_ASSETS
- name: Build
run: |
$PC_FLAGS=""
if ("${{ matrix.sound_engine }}" -eq "lle") {
$PC_FLAGS="-DWANT_LIBSND_LLE=1"
}
cmake -B ${{github.workspace}}/pc $PC_FLAGS -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DSDL2_PATH=C:\temp-sdl2\SDL2-2.28.5
cmake --build ${{github.workspace}}/pc --config ${{ matrix.build_type }}