Skip to content

CI: build for all recent NDK versions #146

CI: build for all recent NDK versions

CI: build for all recent NDK versions #146

Workflow file for this run

name: CI
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 4 1 * *'
jobs:
build:
name: ${{ runner.os }}-${{ matrix.ndk }}

Check failure on line 12 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 12, Col: 11): Unrecognized named-value: 'runner'. Located at position 1 within expression: runner.os .github/workflows/ci.yml (Line: 24, Col: 20): Unrecognized named-value: 'runner'. Located at position 1 within expression: runner.os == 'macOS' && 'Library/Android' || 'Android'
runs-on: ${{ matrix.os }}
# don't run pull requests from local branches twice
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
os: [ macos-latest, ubuntu-latest ]
ndk: [ r25c, r26d, r27c ]
env:
ANDROID_DIR: ${{ runner.os == 'macOS' && 'Library/Android' || 'Android' }}
steps:
- uses: actions/checkout@v3
- uses: nttld/setup-ndk@v1
with:
ndk-version: ${{ matrix.ndk }}
- name: Install packages
run: |
if [ "$RUNNER_OS" = "macOS" ]; then
brew install cmake autoconf automake libtool pkg-config
elif [ "$RUNNER_OS" = "Linux" ]; then
sudo apt-get install curl cmake make libtool pkg-config texinfo python3-distutils
# install autoconf 2.71 from source (required by libffi, not available via apt-get on Ubuntu focal)
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz
tar -xf autoconf-2.71.tar.xz
cd autoconf-2.71 && ./configure --prefix=/usr/ && make && sudo make install
autoconf --version
wget http://ftp.gnu.org/gnu/automake/automake-1.16.4.tar.xz
tar -xf automake-1.16.4.tar.xz
cd automake-1.16.4 && ./configure --prefix=/usr/ && make && sudo make install
automake --version
else
echo Unsupported OS $RUNNER_OS
exit 1
fi
- name: Build toolchain
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./build.sh --ndk $ANDROID_NDK_LATEST_HOME --dist-root HOME/${{env.ANDROID_DIR}}/GNUstep
- name: Package build
run: |
tar -a -cf GNUstep-Android-${{runner.os}}-${{matrix.ndk}}.tar.xz -C$HOME/${{env.ANDROID_DIR}} GNUstep
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
path: GNUstep-Android-${{runner.os}}-${{matrix.ndk}}.tar.xz
name: GNUstep-Android-${{runner.os}}-${{matrix.ndk}}
prerelease:
needs: build
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' }}
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Update GitHub prerelease
if: ${{ github.ref == 'refs/heads/master' }}
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: true
title: "Latest Build"
files: "**/GNUstep-Android-*.tar.xz"