Skip to content
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

Add some basic testing of arm64 linux #1247

Merged
merged 1 commit into from
Jun 27, 2023
Merged
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
15 changes: 15 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ executors:
macos:
xcode: "13.4.1"
resource_class: macos.m1.medium.gen1
linux_arm64:
machine:
image: ubuntu-2004:202101-01
resource_class: arm.medium

commands:
setup-macos:
Expand Down Expand Up @@ -83,6 +87,14 @@ jobs:
command: |
source emsdk_env.sh
test/test.py
test-linux-arm64:
executor: linux_arm64
steps:
- checkout
- run:
name: Install debian packages
command: sudo apt-get update -q && sudo apt-get install -q cmake build-essential openjdk-8-jre-headless
- run: test/test.sh
test-mac:
executor: mac
steps:
Expand Down Expand Up @@ -257,6 +269,9 @@ workflows:
test-linux:
jobs:
- test-linux
test-linux-arm64:
jobs:
- test-linux-arm64
test-mac:
jobs:
- test-mac
Expand Down
22 changes: 15 additions & 7 deletions test/test.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
#!/usr/bin/env bash

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

set -x
set -e

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

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