-
Notifications
You must be signed in to change notification settings - Fork 1
125 lines (102 loc) · 3.62 KB
/
build-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
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
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 @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/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 @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