Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Arignir committed Jan 11, 2024
1 parent c37c3b8 commit 77735ed
Showing 1 changed file with 38 additions and 11 deletions.
49 changes: 38 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,45 @@ jobs:
submodules: recursive
- name: Install Dependencies
run: |
brew install meson ninja sdl2 glew libarchive create-dmg
- name: Build Hades
export BREW_ARM64_ROOT="$(pwd)/brew/arm/"
export BREW_X86_64_ROOT="$(pwd)/brew/x86_64/"
mkdir -p "$BREW_ARM64_ROOT" "BREW_X86_64_ROOT"
curl -L https://github.com/Homebrew/brew/tarball/master -o brew.tar.gz
tar xfz brew.tar.gz --strip 1 -C "$BREW_ARM64_ROOT"
tar xfz brew.tar.gz --strip 1 -C "$BREW_X86_64_ROOT"
alias brew_arm64='arch -arm64 $BREW_ARM64_ROOT/bin/brew'
alias brew_x86_64='arch -x86_64 $BREW_X86_64_ROOT/bin/brew'
alias brew=false
brew_x86_64 install meson ninja sdl2 glew libarchive create-dmg
brew_arm64 install meson ninja sdl2 glew libarchive
- name: Build Hades x86_64
run: |
export PKG_CONFIG_PATH=/usr/local/opt/libarchive/lib/pkgconfig
export PKG_CONFIG_PATH="$BREW_X86_64_ROOT/opt/libarchive/lib/pkgconfig"
rm -rf /tmp/build/x86_64/
mkdir -p /tmp/build/x86_64/Hades.app
arch -x86_64 meson --buildtype=release --prefix=/tmp/build/x86_64/Hades.app --bindir=Contents/MacOS build --werror
arch -x86_64 ninja -C build install
rm -rf /tmp/build/
mkdir -p /tmp/build/Hades.app
- name: Build Hades Arm64
run: |
export PKG_CONFIG_PATH="$BREW_ARM64_ROOT/opt/libarchive/lib/pkgconfig"
meson --buildtype=release --prefix=/tmp/build/Hades.app --bindir=Contents/MacOS build --werror
ninja -C build install
rm -rf /tmp/build/arm64/
mkdir -p /tmp/build/arm64/Hades.app
chmod +x /tmp/build/Hades.app/Contents/MacOS/hades /tmp/build/Hades.app/Contents/MacOS/run.sh
arch -arm64 meson --buildtype=release --prefix=/tmp/build/arm64/Hades.app --bindir=Contents/MacOS build --werror
arch -arm64 ninja -C build install
- name: Build Hades Universal App
run: |
echo "Hades dependencies, before fixing:"
otool -L /tmp/build/Hades.app/Contents/MacOS/hades
echo "End of dependencies"
Expand Down Expand Up @@ -90,9 +116,10 @@ jobs:
otool -L /tmp/build/Hades.app/Contents/MacOS/{hades,*.dylib}
echo "End of dependencies"
- name: Test Hades
- name: Test Hades App
run: |
/tmp/build/Hades.app/Contents/MacOS/hades --help
arch -x86_64 /tmp/build/Hades.app/Contents/MacOS/hades --help
arch -arm64 /tmp/build/Hades.app/Contents/MacOS/hades --help
- name: Sign Hades App
# Only run if a certificate is set
Expand Down Expand Up @@ -121,7 +148,7 @@ jobs:
MACOS_CODESIGN_CRT_PWD: ${{ secrets.MACOS_CODESIGN_CRT_PWD }}
MACOS_CODESIGN_CRT_IDENTITY: ${{ secrets.MACOS_CODESIGN_CRT_IDENTITY }}

- name: Pack Hades
- name: Create Hades DMG
run: |
rm -rf Hades.dmg
Expand Down

0 comments on commit 77735ed

Please sign in to comment.