From f9322091c35d273001806fb0f21da950c6c0ee06 Mon Sep 17 00:00:00 2001 From: Arvind Kaushik Date: Wed, 15 Mar 2023 16:40:42 +0000 Subject: [PATCH 1/2] some `fix` in `README.md` --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9e82a822a..10033299e 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,13 @@ Termux:X11 uses [XCB](https://xcb.freedesktop.org/) display protocol. This repo uses submodules. Use ``` - git clone --recurse-submodules https://github.com/termux/termux-x11 +git clone --recurse-submodules https://github.com/termux/termux-x11.git ``` or ``` - git clone https://github.com/termux/termux-x11 - git submodule update --init --recursive +git clone https://github.com/termux/termux-x11.git +cd termux-x11/ +git submodule update --init --recursive ``` ## How does it work? @@ -77,9 +78,9 @@ To work with GUI applications, start Xvfb first. then you can start your desired graphical application by doing: ``` -~ $ Xvfb :1 -ac -screen 0 4096x4096x24 & -~ $ DISPLAY=:1 termux-x11 & -~ $ env DISPLAY=:1 dbus-launch --exit-with-session startxfce4 +Xvfb :1 -ac -screen 0 4096x4096x24 & +DISPLAY=:1 termux-x11 & +env DISPLAY=:1 dbus-launch --exit-with-session startxfce4 & ``` You may replace `xfce4-session` if you use other than Xfce From 38bb80297f0059eb351d4be85ed459713906647f Mon Sep 17 00:00:00 2001 From: Arvind Kaushik Date: Thu, 16 Mar 2023 00:29:34 +0530 Subject: [PATCH 2/2] make some changes in workflows --- .github/workflows/debug_build.yml | 70 ++++++++++++------- .../workflows/gradle-wrapper-validation.yml | 7 ++ .github/workflows/run_tests.yml | 57 ++++++++++----- 3 files changed, 91 insertions(+), 43 deletions(-) diff --git a/.github/workflows/debug_build.yml b/.github/workflows/debug_build.yml index fe448c48c..6ea0b3485 100644 --- a/.github/workflows/debug_build.yml +++ b/.github/workflows/debug_build.yml @@ -1,45 +1,65 @@ -name: Build +name: Build APK on: push: branches: - master - x11-client-experimental + paths-ignore: + - "**.md" + - "img/**" pull_request: branches: - master + paths-ignore: + - "**.md" + - "img/**" jobs: - build: + build_apk: + name: Build APK runs-on: ubuntu-latest + permissions: + actions: write + steps: - - name: Clone repository - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Restore cache - uses: actions/cache@v3 - with: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.11.0 + with: + access_token: ${{ github.token }} + + - name: Clone repository + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: "17" + distribution: "temurin" + + - name: Restore cache + uses: actions/cache@v3 + with: path: | ~/.gradle/caches ~/.gradle/wrapper key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | ${{ runner.os }}-gradle- - - name: Build - run: | - ./gradlew assembleDebug - - name: Install libarchive-tools - run: | - sudo apt install -y libarchive-tools - - name: Build companion package - run: | - ./build_termux_package - - name: Store generated APK file - uses: actions/upload-artifact@v3 - with: - name: termux-x11 - path: ./app/build/outputs/apk/debug + - name: Build + run: bash ./gradlew assembleDebug + + - name: Install libarchive-tools + run: sudo apt install -y libarchive-tools + + - name: Build companion package + run: bash ./build_termux_package + + - name: Store generated APK file + uses: actions/upload-artifact@v3 + with: + name: termux-x11 + path: ./app/build/outputs/apk/debug diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index 926cc92ad..a0222218c 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -4,9 +4,16 @@ on: push: branches: - master + - x11-client-experimental + paths-ignore: + - "**.md" + - "img/**" pull_request: branches: - master + paths-ignore: + - "**.md" + - "img/**" jobs: validation: diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 7d0801a54..5bbf2536a 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -1,38 +1,59 @@ -name: Unit tests +name: Unit test on: push: branches: - master + - x11-client-experimental + paths-ignore: + - "**.md" + - "img/**" pull_request: branches: - master + paths-ignore: + - "**.md" + - "img/**" jobs: - testing: + unit_test_debug: + name: Run Unit test runs-on: ubuntu-latest + permissions: + actions: write + steps: - - name: Clone repository - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Restore cache - uses: actions/cache@v3 - with: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.11.0 + with: + access_token: ${{ github.token }} + + - name: Clone repository + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: "17" + distribution: "temurin" + + - name: Restore cache + uses: actions/cache@v3 + with: path: | ~/.gradle/caches ~/.gradle/wrapper key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | ${{ runner.os }}-gradle- - - - name: Execute tests - run: | - ./gradlew test --stacktrace - - name: Android Integration Test - uses: ReactiveCircus/android-emulator-runner@v2.27.0 - with: + + - name: Execute tests + run: bash ./gradlew test --stacktrace + + - name: Android Integration Test + uses: ReactiveCircus/android-emulator-runner@v2.27.0 + with: api-level: 28 script: ./gradlew test