Skip to content

Fix macOS arm pipeline #3259 #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: community
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ jobs:
if: contains(matrix.os, 'macOS')
run: |
brew update || true
brew install pkg-config sdl2 python3 ninja || true
brew install pkg-config sdl2 python3 ninja gdb || true
# --overwrite for: Target /usr/local/bin/2to3 already exists.
brew link --overwrite [email protected]
brew upgrade freetype
sudo rm -rf /Library/Developer/CommandLineTools
brew install gdb

- name: Build in debug mode
env: ${{ matrix.env }}
Expand Down Expand Up @@ -122,7 +123,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: matricks/bam
ref: 8cd08744c37666830d439ab54016c9d228c63b68
ref: 657d1a0b47d1210b6d10bea12fdd28938f175d25
path: ./bam

- name: Prepare Linux
Expand All @@ -147,6 +148,13 @@ jobs:
cd bam
./make_win64_msvc.bat

- name: Build in debug mode (macos gdb)
if: contains(matrix.os, 'macOS')
run: |
otool -L ./bam/bam
sudo dtruss ./bam/bam conf=debug all
# gdb -ex='set confirm off' -ex='set pagination off' -ex=run -ex=bt -ex=quit ./bam/bam conf=debug all

- name: Build in debug mode
run: ./bam/bam conf=debug all
- name: Test debug
Expand Down
11 changes: 8 additions & 3 deletions bam.lua
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,11 @@ function GenerateMacOSSettings(settings, conf, arch, compiler)
elseif arch == "ppc64" then
settings.cc.flags:Add("-arch ppc64")
settings.link.flags:Add("-arch ppc64")
elseif arch == "arm64" then
settings.cc.flags:Add("-arch arm64")
settings.link.flags:Add("-arch arm64")
else
print("Unknown Architecture '" .. arch .. "'. Supported: x86, x86_64, ppc, ppc64")
print("Unknown Architecture '" .. arch .. "'. Supported: x86, x86_64, ppc, ppc64, arm64")
os.exit(1)
end

Expand Down Expand Up @@ -185,8 +188,10 @@ function GenerateLinuxSettings(settings, conf, arch, compiler)
settings.link.flags:Add("-m64")
elseif arch == "armv7l" then
-- arm 32 bit
elseif arch == "arm64" then
-- arm 64 bit
else
print("Unknown Architecture '" .. arch .. "'. Supported: x86, x86_64")
print("Unknown Architecture '" .. arch .. "'. Supported: x86, x86_64, armv7l, arm64")
os.exit(1)
end
settings.link.libs:Add("pthread")
Expand Down Expand Up @@ -504,7 +509,7 @@ if ScriptArgs['arch'] then
else
if arch == "ia32" then
archs = {"x86"}
elseif arch == "ia64" or arch == "amd64" or arch == "arm64" then
elseif arch == "ia64" or arch == "amd64" then
archs = {"x86_64"}
else
archs = {arch}
Expand Down