Skip to content

testing x86 arch

testing x86 arch #62

Workflow file for this run

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_x64
cd build_x64
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
cp deps/pksav/build_x64/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_x64/lib/libpksav.dylib @rpath/libpksav.dylib build_x64/pokeromtrader
install_name_tool -add_rpath @executable_path/../Frameworks 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_arm64
cd build_arm64
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
cp deps/pksav/build_arm64/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_arm64/lib/libpksav.dylib @rpath/libpksav.dylib build_arm64/pokeromtrader
install_name_tool -add_rpath @executable_path/../Frameworks 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 # Specify the name of the x64 build artifact
- name: Download Build Artifact (arm64)
uses: actions/download-artifact@v2
with:
name: pokeromtrader-artifacts-arm64 # Specify the name of the arm64 build artifact
# Rest of your steps for bundling macOS release remain the same
- name: Upload macOS Release (x64)
uses: actions/upload-artifact@v2
with:
name: pokeromtrader-x64 # Specify a name for your x64 macOS release
path: build_x64/macos
- name: Upload macOS Release (arm64)
uses: actions/upload-artifact@v2
with:
name: pokeromtrader-arm64 # Specify a name for your arm64 macOS release
path: build_arm64/macos
- name: Clean Up
run: |
make clean