diff --git a/.github/scripts/ensure_base_deps.py b/.github/scripts/ensure_base_deps.py index 4122d4b..f2bd484 100755 --- a/.github/scripts/ensure_base_deps.py +++ b/.github/scripts/ensure_base_deps.py @@ -33,7 +33,7 @@ def download_base_archive(base_name): ARCHIVE_NAME_TEMPLATE = "base_deps2_{os}_{platform}_{version}.tar.xz" if PLATFORM_TARGET == 'flatpak': - base_dep_archive_name = "base_deps2_{}_flatpak.tar.xz".format(OS_NAME) + base_dep_archive_name = "base_deps2_flatpak.tar.xz" else: base_dep_archive_name = ARCHIVE_NAME_TEMPLATE.format( os=OS_NAME, diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e47d9d5..7baebb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,6 +111,48 @@ jobs: env: PLATFORM_TARGET: ${{matrix.target}} + Flatpak: + strategy: + fail-fast: false + env: + HOME: /home/runner + SSH_KEY: /tmp/id_rsa + PLATFORM_TARGET: flatpak + OS_NAME: focal + runs-on: ubuntu-latest + steps: + - name: Checkout code + shell: bash + run: | + cd $HOME + git clone https://github.com/${REP} + cd ./${REP##*/} + git checkout --force ${GITHUB_SHA} + pip3 install --user --no-deps . + env: + REP: ${{github.repository}} + - name: Install flatpak tools + run: | + sudo apt-get update + sudo apt-get install flatpak-builder ninja-build meson + - name: secret + shell: bash + run: | + echo "${{secrets.ssh_key}}" > $SSH_KEY + chmod 600 $SSH_KEY + - name: Ensure base deps + shell: bash + run: | + cd $HOME + kiwix-build/.github/scripts/ensure_base_deps.py + - name: Build projects + shell: bash + run: | + cd $HOME + kiwix-build/.github/scripts/build_projects.py + - name: Upload failure logs + if: failure() + run: $HOME/kiwix-build/.github/scripts/upload_failure_logs.sh Macos: strategy: diff --git a/.github/workflows/releaseNigthly.yml b/.github/workflows/releaseNigthly.yml index 9a081e1..bf11e6f 100644 --- a/.github/workflows/releaseNigthly.yml +++ b/.github/workflows/releaseNigthly.yml @@ -44,7 +44,6 @@ jobs: - win32_static - i586_static - android - - flatpak include: - target: native_static image_variant: xenial @@ -70,9 +69,6 @@ jobs: - target: android image_variant: xenial lib_postfix: '/x86_64-linux-gnu' - - target: flatpak - image_variant: bionic - lib_postfix: '/x86_64-linux-gnu' env: HOME: /home/runner SSH_KEY: /tmp/id_rsa @@ -113,13 +109,56 @@ jobs: PLATFORM_TARGET: ${{matrix.target}} BINTRAY_USER: kiwix BINTRAY_PASS: ${{secrets.bintray_pass}} - GITHUB_PAT: ${{secrets.GHCR_TOKEN}} - name: Upload failure logs if: failure() run: $HOME/kiwix-build/.github/scripts/upload_failure_logs.sh env: PLATFORM_TARGET: ${{matrix.target}} + Flatpak: + strategy: + fail-fast: false + env: + HOME: /home/runner + SSH_KEY: /tmp/id_rsa + PLATFORM_TARGET: flatpak + OS_NAME: focal + runs-on: ubuntu-latest + steps: + - name: Checkout code + shell: bash + run: | + cd $HOME + git clone https://github.com/${REP} + cd ./${REP##*/} + git checkout --force ${GITHUB_SHA} + pip3 install --user --no-deps . + env: + REP: ${{github.repository}} + - name: Install flatpak tools + run: | + sudo apt-get update + sudo apt-get install flatpak-builder ninja-build meson + - name: secret + shell: bash + run: | + echo "${{secrets.ssh_key}}" > $SSH_KEY + chmod 600 $SSH_KEY + - name: Ensure base deps + shell: bash + run: | + cd $HOME + kiwix-build/.github/scripts/ensure_base_deps.py + - name: Build release + shell: bash + run: | + cd $HOME + kiwix-build/.github/scripts/build_release_nightly.py + env: + GITHUB_PAT: ${{secrets.GHCR_TOKEN}} + - name: Upload failure logs + if: failure() + run: $HOME/kiwix-build/.github/scripts/upload_failure_logs.sh Macos: strategy: