Skip to content
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
67 changes: 59 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-20.04-arm64, ubuntu-20.04, macos-latest, windows-latest]
platform: [debian-bullseye-arm32, ubuntu-20.04-arm64, ubuntu-20.04, macos-latest, windows-latest]
include:
- platform: debian-bullseye-arm32
tools_url: https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
- platform: ubuntu-20.04-arm64
tools_url: https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
- platform: ubuntu-20.04
Expand All @@ -45,11 +47,20 @@ jobs:

steps:
- name: Set up JDK 11 for toolchains
if: runner.arch != 'ARM'
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11

- name: Set up JDK 11 for toolchains (ARM)
if: runner.arch == 'ARM'
uses: actions/setup-java@v4
with:
distribution: 'zulu'
architecture: 'aarch32hf'
java-version: 11

- name: Set runner-specific environment variables
shell: bash
run: |
Expand Down Expand Up @@ -110,6 +121,40 @@ jobs:
ninja-build \
openjdk-11-jre-headless

- name: Setup Linux environment (ARM32)
if: runner.os == 'Linux' && runner.arch == 'ARM'
run: |
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV

sudo apt-get -qq update
sudo apt-get -qq install -y --no-install-recommends \
build-essential \
git \
cmake \
clang \
bzip2 \
curl \
g++ \
gcc \
make \
jq \
tar \
unzip \
wget \
zip \
time \
telnet \
ssh \
sshpass \
lz4 \
binutils \
xz-utils \
tree \
tk \
ninja-build \
openjdk-11-jdk-headless

- name: Setup macOS environment
if: runner.os == 'macOS'
run: |
Expand Down Expand Up @@ -152,7 +197,7 @@ jobs:
ninja
popd

- name: Build BoringSSL 64-bit Linux
- name: Build BoringSSL Linux
if: runner.os == 'Linux'
run: |
mkdir -p "$BORINGSSL_HOME/build64"
Expand Down Expand Up @@ -191,14 +236,14 @@ jobs:
run: ./gradlew publishToMavenLocal -Dmaven.repo.local="$M2_REPO"

- name: Upload Maven respository
if: runner.os != 'Linux' || runner.arch != 'ARM64'
if: runner.os != 'Linux'
uses: actions/upload-artifact@v4
with:
name: m2repo-${{ runner.os }}
path: ${{ runner.temp }}/m2

- name: Upload Maven respository (Linux ARM64)
if: runner.os == 'Linux' && runner.arch == 'ARM64'
- name: Upload Maven respository (Linux)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: m2repo-${{ runner.os }}-${{ runner.arch }}
Expand Down Expand Up @@ -263,13 +308,19 @@ jobs:
# mkdir -p "${{ runner.temp }}/boringssl/build64"
# mkdir -p "${{ runner.temp }}/boringssl/include"

- name: Download Maven repository for Linux
- name: Download Maven repository for Linux (ARM)
uses: actions/download-artifact@v4
with:
name: m2repo-Linux-ARM
path: ${{ runner.temp }}/m2

- name: Download Maven repository for Linux (X64)
uses: actions/download-artifact@v4
with:
name: m2repo-Linux
name: m2repo-Linux-X64
path: ${{ runner.temp }}/m2

- name: Download Maven repository for Linux ARM64
- name: Download Maven repository for Linux (ARM64)
uses: actions/download-artifact@v4
with:
name: m2repo-Linux-ARM64
Expand Down
41 changes: 41 additions & 0 deletions arm32-runner-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Setup ARM32 Runner on ARM64 (v8)

## AWS VM

- Instance type: c7g.xlarge
- Graviton3

## Setup Docker and Start Docker

```bash
sudo apt update
sudo apt dist-upgrade
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh
sudo usermod -aG docker $USER
sudo reboot
docker run -it --platform linux/arm/v7 arm32v7/debian:bullseye bash
```

## Check Environment

```bash
dpkg --print-architecture
ldd --version
uname -m
```

## Prepare GitHub Runner

```bash
apt-get -qq update
apt-get install libatomic1 curl sudo openjdk-11-jdk-headless
```

```bash
mkdir actions-runner && cd actions-runner
[ownload and extract]
RUNNER_ALLOW_RUNASROOT=1 ./config.sh --url https://github.com/bruestel/conscrypt --token xyz
RUNNER_ALLOW_RUNASROOT=1 ./run.sh
```

6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ subprojects {
args << "-Wno-unused-result"
}
}
target("linux_arm-v7") {
cppCompiler.executable = "/usr/bin/gcc"
cppCompiler.withArguments { args ->
args << "-Wno-unused-result"
}
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion openjdk-uber/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Directory buildTop = layout.buildDirectory.get()
ext {
buildUberJar = Boolean.parseBoolean(System.getProperty('org.conscrypt.openjdk.buildUberJar', 'false'))
uberJarClassifiers = (System.getProperty('org.conscrypt.openjdk.uberJarClassifiers',
'osx-x86_64,osx-aarch_64,linux-x86_64,linux-aarch_64,windows-x86_64')).split(',')
'osx-x86_64,osx-aarch_64,linux-x86_64,linux-aarch_64,linux-arm_32,windows-x86_64')).split(',')
classesDir = buildTop.dir('classes')
resourcesDir = buildTop.dir('resources')
sourcesDir = buildTop.dir('sources')
Expand Down
2 changes: 2 additions & 0 deletions openjdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ enum NativeBuildInfo {
WINDOWS_X86_64("windows", "x86_64"),
LINUX_X86_64("linux", "x86_64"),
LINUX_AARCH64("linux", "aarch_64"),
LINUX_ARM("linux", "arm_32"),
MAC_X86_64("osx", "x86_64") {
String libDir() {
"build.x86"
Expand All @@ -42,6 +43,7 @@ enum NativeBuildInfo {
private static final gradleArchMap = [
"aarch_64": "aarch64",
"x86_64" : "x86-64",
"arm_32" : "arm-v7",
]

NativeBuildInfo(String os, String arch) {
Expand Down
Loading