Skip to content

Commit 88ee963

Browse files
authored
Add some basic testing of arm64 linux (#1247)
1 parent 1d59cd2 commit 88ee963

File tree

2 files changed

+30
-7
lines changed

2 files changed

+30
-7
lines changed

.circleci/config.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ executors:
2525
macos:
2626
xcode: "13.4.1"
2727
resource_class: macos.m1.medium.gen1
28+
linux_arm64:
29+
machine:
30+
image: ubuntu-2004:202101-01
31+
resource_class: arm.medium
2832

2933
commands:
3034
setup-macos:
@@ -83,6 +87,14 @@ jobs:
8387
command: |
8488
source emsdk_env.sh
8589
test/test.py
90+
test-linux-arm64:
91+
executor: linux_arm64
92+
steps:
93+
- checkout
94+
- run:
95+
name: Install debian packages
96+
command: sudo apt-get update -q && sudo apt-get install -q cmake build-essential openjdk-8-jre-headless
97+
- run: test/test.sh
8698
test-mac:
8799
executor: mac
88100
steps:
@@ -257,6 +269,9 @@ workflows:
257269
test-linux:
258270
jobs:
259271
- test-linux
272+
test-linux-arm64:
273+
jobs:
274+
- test-linux-arm64
260275
test-mac:
261276
jobs:
262277
- test-mac

test/test.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
11
#!/usr/bin/env bash
22

33
echo "test the standard workflow (as close as possible to how a user would do it, in the shell)"
4+
echo "machine: $(uname -m)"
5+
echo "kernel: $(uname -s)"
46

57
set -x
68
set -e
79

810
# Test that arbitrary (non-released) versions can be installed and
911
# activated.
10-
./emsdk install sdk-upstream-1b7f7bc6002a3ca73647f41fc10e1fac7f06f804
11-
./emsdk activate sdk-upstream-1b7f7bc6002a3ca73647f41fc10e1fac7f06f804
12-
source ./emsdk_env.sh
13-
which emcc
14-
emcc -v
12+
# This test cannot run on linux-arm64 because only certain binaries
13+
# get uploaded for this architecture.
14+
if [[ !($(uname -s) == "Linux" && $(uname -m) == "aarch64") ]]; then
15+
./emsdk install sdk-upstream-1b7f7bc6002a3ca73647f41fc10e1fac7f06f804
16+
./emsdk activate sdk-upstream-1b7f7bc6002a3ca73647f41fc10e1fac7f06f804
17+
source ./emsdk_env.sh
18+
which emcc
19+
emcc -v
20+
fi
1521

22+
# Install an older version of the SDK that requires EM_CACHE to be
23+
# set in the environment, so that we can test it is later removed
24+
# This test only runs on x64 because we didn't build arm binaries
25+
# when this older version of the SDK was built.
1626
if [[ $(uname -m) == "x86_64" ]]; then
17-
# Install an older version of the SDK that requires EM_CACHE to be
18-
# set in the environment, so that we can test it is later removed
1927
./emsdk install sdk-1.39.15
2028
./emsdk activate sdk-1.39.15
2129
source ./emsdk_env.sh

0 commit comments

Comments
 (0)