diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6f40434a7..c4cb23c29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: "Checkout repo" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" fetch-depth: 0 @@ -36,7 +36,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: "Checkout repo" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" fetch-depth: 0 @@ -60,7 +60,7 @@ jobs: runs-on: windows-latest steps: - name: "Checkout repo" - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: "recursive" fetch-depth: 0 @@ -106,3 +106,48 @@ jobs: shell: msys2 {0} run: | cmake --build build + + build-android: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up JDK 8 + uses: actions/setup-java@v4 + with: + java-version: '8' + distribution: 'adopt' + + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y git wget unzip ant + + - name: Set up Android Tools and Build Tree + env: + ANDROID_HOME: ${{ github.workspace }}/android-tools + run: | + mkdir $ANDROID_HOME + wget https://dl.google.com/android/repository/tools_r25.2.5-linux.zip -P $ANDROID_HOME + unzip $ANDROID_HOME/tools_r25.2.5-linux.zip -d $ANDROID_HOME + echo y | $ANDROID_HOME/tools/bin/sdkmanager "platform-tools" "build-tools;30.0.3" "ndk-bundle" "platforms;android-19" "platforms;android-30" + mkdir ${{ github.workspace }}/el + git clone https://github.com/pjbroad/el-build-methods.git ${{ github.workspace }}/el/el-build-methods + git clone https://github.com/raduprv/Eternal-Lands.git ${{ github.workspace }}/el/el-build-methods/android/jni/src + + - name: Setup libs + env: + ANDROID_HOME: ${{ github.workspace }}/android-tools + run: | + cd ${{ github.workspace }}/el/el-build-methods/android/ + ./setup-libs.bash + + - name: Build Android Package + env: + ANDROID_HOME: ${{ github.workspace }}/android-tools + APP_ALLOW_MISSING_DEPS: true + run: | + cd ${{ github.workspace }}/el/el-build-methods/android/ + $ANDROID_HOME/ndk-bundle/ndk-build -j $(nproc)