Skip to content

Commit

Permalink
Again
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert committed Dec 16, 2024
1 parent cd7c3e1 commit bae2375
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 51 deletions.
3 changes: 0 additions & 3 deletions .github/actions/nss/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ runs:
ANDROID_TOOLCHAIN='$ANDROID_NDK/toolchains/llvm/prebuilt/linux-'"$(uname -m)"
ANDROID_SYSROOT="$ANDROID_TOOLCHAIN/sysroot"
sed -i "/NSPR.*configure/i extra_params+=(--with-android-ndk=\"$ANDROID_NDK\")\nextra_params+=(--target=\"${{ inputs.target }}\")\nextra_params+=(--with-android-platform=\"$ANDROID_SYSROOT\")\nextra_params+=(--with-android-toolchain=\"$ANDROID_TOOLCHAIN\")" $NSS_DIR/coreconf/nspr.sh
ln -sfv "$ANDROID_TOOLCHAIN/bin/${{ inputs.target }}30-clang" "$ANDROID_TOOLCHAIN/bin/${{ inputs.target }}-gcc"
ln -sfv "$ANDROID_TOOLCHAIN/bin/${{ inputs.target }}30-clang++" "$ANDROID_TOOLCHAIN/bin/${{ inputs.target }}-g++"
ls -l "$ANDROID_TOOLCHAIN/bin"
done
- name: Build
Expand Down
103 changes: 55 additions & 48 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
workflow_dispatch:
inputs:
run_benchmarks:
description: 'Run benchmarks'
description: "Run benchmarks"
type: boolean
required: false
default: false
Expand Down Expand Up @@ -160,50 +160,57 @@ jobs:
api-level: 19

steps:
- name: Checkout code
uses: actions/checkout@v4

# - name: Install JDK
# uses: actions/setup-java@v4
# with:
# distribution: 'zulu'
# java-version: '21'

# - name: Install Android SDK
# uses: android-actions/setup-android@v3

# - name: Install Android NDK
# run: sdkmanager --install "ndk;$NDK_VERSION"

- uses: ./.github/actions/rust
with:
version: stable
targets: ${{ matrix.target }}
tools: cargo-ndk
token: ${{ secrets.GITHUB_TOKEN }}

- id: nss-version
run: echo "minimum=$(cat neqo-crypto/min_version.txt)" >> "$GITHUB_OUTPUT"

- uses: ./.github/actions/nss
with:
minimum-version: ${{ steps.nss-version.outputs.minimum }}
target: ${{ matrix.target }}

- name: Build unit tests for Android
run: |
env | sort
cargo ndk -t ${{ matrix.target }} test --no-run
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Set up Android Emulator and run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.emulator-arch }}
script: .github/workflows/check-android-run-tests-on-emulator.sh
- name: Checkout code
uses: actions/checkout@v4

# - name: Install JDK
# uses: actions/setup-java@v4
# with:
# distribution: 'zulu'
# java-version: '21'

# - name: Install Android SDK
# uses: android-actions/setup-android@v3

# - name: Install Android NDK
# run: sdkmanager --install "ndk;$NDK_VERSION"

- uses: ./.github/actions/rust
with:
version: stable
targets: ${{ matrix.target }}
tools: cargo-ndk
token: ${{ secrets.GITHUB_TOKEN }}

- id: nss-version
run: echo "minimum=$(cat neqo-crypto/min_version.txt)" >> "$GITHUB_OUTPUT"

- name: Fix Android toolchain for NSPR
run: |
ls -l "$ANDROID_TOOLCHAIN/bin"
ln -sfv "$ANDROID_TOOLCHAIN/bin/${{ matrix.target }}30-clang" "$ANDROID_TOOLCHAIN/bin/${{ matrix.target }}-gcc"
ln -sfv "$ANDROID_TOOLCHAIN/bin/${{ matrix.target }}30-clang++" "$ANDROID_TOOLCHAIN/bin/${{ matrix.target }}-g++"
ls -l "$ANDROID_TOOLCHAIN/bin"
- uses: ./.github/actions/nss
with:
minimum-version: ${{ steps.nss-version.outputs.minimum }}
target: ${{ matrix.target }}

- name: Build unit tests for Android
run: |
env | sort
cargo ndk -t ${{ matrix.target }} test --no-run
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Set up Android Emulator and run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.emulator-arch }}
script: .github/workflows/check-android-run-tests-on-emulator.sh

0 comments on commit bae2375

Please sign in to comment.