testing x86 arch #65
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: Build and Bundle macOS (x64 and arm64) | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_x64: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
arch: [x64] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Build pksav | |
run: | | |
cd deps/pksav/ | |
mkdir build | |
cd build | |
cmake .. | |
make | |
- name: Build raylib | |
run: | | |
cd deps/raylib/src/ | |
make PLATFORM=PLATFORM_DESKTOP | |
- name: Build Project | |
run: | | |
make all | |
- name: Bundle Executable with Library | |
run: | | |
# Copy libpksav.dylib to the same directory as the executable | |
mkdir build_x64 | |
cp deps/pksav/build/lib/libpksav.dylib build_x64/ | |
# Update the library path in the executable | |
install_name_tool -change /Users/runner/work/pokerom-trader/pokerom-trader/deps/pksav/build/lib/libpksav.dylib @executable_path/libpksav.dylib build_x64/pokeromtrader | |
- name: Publish Build Artifacts (x64) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pokeromtrader-artifacts-x64 # Specify a name for your x64 artifacts | |
path: build_x64/ # Specify the directory containing your x64 build artifacts | |
build_arm64: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
arch: [arm64] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Build pksav | |
run: | | |
cd deps/pksav/ | |
mkdir build | |
cd build | |
cmake .. | |
make | |
- name: Build raylib | |
run: | | |
cd deps/raylib/src/ | |
make PLATFORM=PLATFORM_DESKTOP | |
- name: Build Project | |
run: | | |
make all | |
- name: Bundle Executable with Library | |
run: | | |
# Copy libpksav.dylib to the same directory as the executable | |
mkdir build_arm64 | |
cp deps/pksav/build/lib/libpksav.dylib build_arm64/ | |
# Update the library path in the executable | |
install_name_tool -change /Users/runner/work/pokerom-trader/pokerom-trader/deps/pksav/build/lib/libpksav.dylib @executable_path/libpksav.dylib build_arm64/pokeromtrader | |
- name: Publish Build Artifacts (arm64) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pokeromtrader-artifacts-arm64 # Specify a name for your arm64 artifacts | |
path: build_arm64/ # Specify the directory containing your arm64 build artifacts | |
bundle_macos_release: | |
runs-on: macos-latest | |
needs: [build_x64, build_arm64] # Ensure that both the 'build_x64' and 'build_arm64' jobs are completed before this one starts | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Download Build Artifact (x64) | |
uses: actions/download-artifact@v2 | |
with: | |
name: pokeromtrader-artifacts-x64 | |
- name: Download Build Artifact (arm64) | |
uses: actions/download-artifact@v2 | |
with: | |
name: pokeromtrader-artifacts-arm64 | |
- name: Upload macOS Release (x64) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: pokeromtrader-x64 | |
path: build_x86/macos | |
- name: Upload macOS Release (arm64) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: pokeromtrader-arm64 | |
path: build/macos | |
- name: Clean Up | |
run: | | |
make clean |