Use action to checkout the code

This commit is contained in:
Emmanuel Engelhart 2023-07-03 06:46:45 +02:00
parent 1a53ad6844
commit 9445197881
No known key found for this signature in database
GPG Key ID: 120B30D020B553D3

View File

@ -22,33 +22,21 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
container: container:
image: ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:38 image: ghcr.io/kiwix/kiwix-build_ci_${{matrix.image_variant}}:38
steps: steps:
- name: Extract branch name - name: Install dependencies
shell: bash shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" run: |
id: extract_branch ARCHIVE_NAME=deps2_focal_native_dyn_kiwix-desktop.tar.xz
- name: Checkout code wget -O- http://tmp.kiwix.org/ci/${ARCHIVE_NAME} | tar -xJ -C ${{env.HOME}}
shell: python
run: | - name: Retrieve source code
from subprocess import check_call uses: actions/checkout@v3
from os import environ
command = [ - name: Compile source code
'git', 'clone', shell: bash
'https://github.com/${{github.repository}}', env:
'--depth=1', PKG_CONFIG_PATH: "/home/runner/BUILD_native_dyn/INSTALL/lib/pkgconfig:/home/runner/BUILD_native_dyn/INSTALL/lib${{matrix.lib_postfix}}/pkgconfig"
'--branch', '${{steps.extract_branch.outputs.branch}}' run: |
] qmake PREFIX=$HOME/BUILD_native_dyn/INSTALL
check_call(command, cwd=environ['HOME']) make
- name: Install deps
shell: bash
run: |
ARCHIVE_NAME=deps2_focal_native_dyn_kiwix-desktop.tar.xz
wget -O- http://tmp.kiwix.org/ci/${ARCHIVE_NAME} | tar -xJ -C /home/runner
- name: Compile
shell: bash
run: |
cd $HOME/kiwix-desktop
qmake PREFIX=$HOME/BUILD_native_dyn/INSTALL
make
env:
PKG_CONFIG_PATH: "/home/runner/BUILD_native_dyn/INSTALL/lib/pkgconfig:/home/runner/BUILD_native_dyn/INSTALL/lib${{matrix.lib_postfix}}/pkgconfig"