Skip to content

refactor!: replace libgit2 submodule with lde-build usage #31

refactor!: replace libgit2 submodule with lde-build usage

refactor!: replace libgit2 submodule with lde-build usage #31

Workflow file for this run

name: Test
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
deps: sudo apt-get install -y cmake libssl-dev
- os: ubuntu-22.04-arm
deps: sudo apt-get install -y cmake libssl-dev
- os: ubuntu-22.04-arm
android: true
- os: windows-latest
- os: windows-11-arm
- os: macos-15
deps: brew install cmake
- os: macos-15-intel
deps: brew install cmake
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
if: matrix.deps
run: ${{ matrix.deps }}
- name: Setup cmake (Windows ARM64)
if: matrix.os == 'windows-11-arm'
uses: jwlawson/actions-setup-cmake@v2
- name: Setup lde
if: "!matrix.android"
uses: lde-org/setup-lde@master
with:
version: nightly
- name: Run tests
if: "!matrix.android"
run: lde test
- name: Fix workspace permissions (Android)
if: matrix.android
run: chmod -R a+rw ${{ github.workspace }}
- name: Cache Android test image
if: matrix.android
id: cache-android-image
uses: actions/cache@v5
with:
path: /tmp/termux-android.tar
key: termux-android-v5
- name: Setup Android test image
if: matrix.android
run: |
if [[ "${{ steps.cache-android-image.outputs.cache-hit }}" == "true" ]]; then
docker load -i /tmp/termux-android.tar
else
docker rm -f termux-build 2>/dev/null || true
docker run --privileged --platform linux/arm64 --name termux-build \
-e DEBIAN_FRONTEND=noninteractive \
termux/termux-docker:aarch64 \
bash -c "apt update && apt upgrade -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold && apt install -y git clang curl zip make cmake openssl && curl -fsSL https://lde.sh/install | sh -s -- --nightly"
docker commit termux-build termux-android:latest
docker rm termux-build
docker save termux-android:latest -o /tmp/termux-android.tar
fi
- name: Run tests (Android)
if: matrix.android
run: |
docker run --rm --privileged \
--platform linux/arm64 \
-v ${{ github.workspace }}:/workspace \
-w /workspace \
termux-android:latest \
bash -c "/data/data/com.termux/files/home/.lde/lde test"