Skip to content

Commit 2a8b5c4

Browse files
committed
build and use codegen for arm64
1 parent f8cc94b commit 2a8b5c4

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ jobs:
3535
os: ubuntu-22.04
3636
id: linux
3737
extra_flags: ''
38+
- name: Linux ARM64
39+
os: ubuntu-22.04-arm
40+
id: linux-aarch64
41+
extra_flags: ''
3842

3943
name: Build ${{ matrix.config.name }}
4044
runs-on: ${{ matrix.config.os }}
@@ -79,7 +83,7 @@ jobs:
7983
sudo apt install gcc-12 g++-12
8084
sudo ln -sf /usr/bin/gcc-12 /usr/bin/clang
8185
sudo ln -sf /usr/bin/g++-12 /usr/bin/clang++
82-
if: matrix.config.id == 'linux'
86+
if: matrix.config.id == 'linux' || matrix.config.id == 'linux-aarch64'
8387

8488
- name: Configure
8589
run: >
@@ -119,10 +123,13 @@ jobs:
119123
mv geode-codegen-win/Codegen.exe geode-codegen-win.exe
120124
mv geode-codegen-mac/Codegen geode-codegen-mac-temp
121125
mv geode-codegen-linux/Codegen geode-codegen-linux-temp
126+
mv geode-codegen-linux-aarch64/Codegen geode-codegen-linux-arm64-temp
122127
rmdir geode-codegen-mac
123128
rmdir geode-codegen-linux
129+
rmdir geode-codegen-linux-aarch64
124130
mv geode-codegen-mac-temp geode-codegen-mac
125131
mv geode-codegen-linux-temp geode-codegen-linux
132+
mv geode-codegen-linux-arm64-temp geode-codegen-linux-arm64
126133
127134
- name: Update Codegen Release
128135
uses: andelf/nightly-release@main
@@ -136,3 +143,4 @@ jobs:
136143
./geode-codegen-win.exe
137144
./geode-codegen-mac
138145
./geode-codegen-linux
146+
./geode-codegen-linux-arm64

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ if (NOT DEFINED SKIP_BUILDING_CODEGEN)
6060
set(GEODE_CODEGEN_DOWNLOAD_FILE_NAME geode-codegen-win.exe)
6161
set(GEODE_CODEGEN_TARGET_FILE_NAME Codegen.exe)
6262
elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
63-
set(GEODE_CODEGEN_DOWNLOAD_FILE_NAME geode-codegen-linux)
63+
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64|arm64")
64+
set(GEODE_CODEGEN_DOWNLOAD_FILE_NAME geode-codegen-linux-arm64)
65+
else()
66+
set(GEODE_CODEGEN_DOWNLOAD_FILE_NAME geode-codegen-linux)
67+
endif()
6468
set(GEODE_CODEGEN_TARGET_FILE_NAME Codegen)
6569
elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
6670
set(GEODE_CODEGEN_DOWNLOAD_FILE_NAME geode-codegen-mac)

0 commit comments

Comments
 (0)