name: Build and Test a3270 on: push: branches: [ "main", "master", "develop" ] pull_request: branches: [ "main", "master" ] workflow_dispatch: jobs: build: name: Build Android APK runs-on: ubuntu-latest steps: - name: Configure Dynamic DNS Resolvers run: | printf "nameserver 1.1.1.1\nnameserver 8.8.8.8\n" > /etc/resolv.conf 2>/dev/null || true echo "64.22.43.251 git.hugfreevikings.wtf" | sudo tee -a /etc/hosts || echo "64.22.43.251 git.hugfreevikings.wtf" >> /etc/hosts || true - name: Checkout Code uses: actions/checkout@v3 with: fetch-depth: 0 - name: Checkout j3270 (for lib3270j) run: | git clone --depth 1 https://git.hugfreevikings.wtf/rudi/j3270.git j3270 - name: Set up Java JDK (Temurin 21) uses: actions/setup-java@v3 continue-on-error: true with: java-version: '21' distribution: 'temurin' - name: Set up Android SDK uses: android-actions/setup-android@v3 - name: Make scripts executable run: | chmod +x ./gradlew ./build.sh - name: Build Android APK run: | ./gradlew assembleDebug --no-daemon env: J3270_DIR: ${{ github.workspace }}/j3270 - name: Upload a3270 APK Artifact uses: actions/upload-artifact@v3 continue-on-error: true with: name: a3270-debug path: build/outputs/apk/debug/a3270-debug.apk - name: Report Build Status if: failure() run: | echo "### ❌ Build Failed" >> $GITHUB_STEP_SUMMARY echo "Please check the runner logs above for details." >> $GITHUB_STEP_SUMMARY