Skip to content

Commit

Permalink
CI: update actions/download-artifact to 4
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Sep 14, 2024
1 parent 81feb53 commit c8e5637
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 35 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Author: Kang Lin <[email protected]>

name: android

on:
Expand Down Expand Up @@ -26,21 +28,23 @@ jobs:
ANDROID_ABI: x86_64
ENABLE_DOWNLOAD_MODULE: ON

# See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners
# See: https://github.com/actions/runner-images/
runs-on: ubuntu-latest

env:
artifact_name: build_android
SOURCE_DIR: ${{github.workspace}}/.cache/source
TOOSL_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.BUILD_TYPE}}
VCPKGGITCOMMITID: 007aaced1a9d3245e28a2ba9395dca88ea890db1
VCPKGGITCOMMITID: 110c50d4700794d87d95138cd8c1b3bbfee9bab5
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
VCPKG_DEFAULT_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
VCPKG_DEFAULT_HOST_TRIPLET: x64-linux
ANDROID_PLATFORM: android-23
ANDROID_NATIVE_API_LEVEL: 23
ANDROID_ABI: ${{matrix.ANDROID_ABI}}
qt_modules: 'qtwebchannel qtwebsockets qtwebview qtimageformats qtmultimedia qtscxml qt5compat'
qt_modules: 'qtimageformats qtmultimedia qtscxml qt5compat qtwebchannel qtpositioning'
FaceRecognizer_VERSION: v0.0.4
ENABLE_DOWNLOAD_MODULE: ${{matrix.ENABLE_DOWNLOAD_MODULE}}

Expand Down Expand Up @@ -74,6 +78,12 @@ jobs:
${{env.INSTALL_DIR}}
key: install_android_qt${{matrix.qt_version}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}}

- name: Install apt packages
run: |
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt install -y -q ninja-build nasm
- name: run-vcpkg
uses: lukka/run-vcpkg@v11
with:
Expand Down Expand Up @@ -129,10 +139,7 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DQT_HOST_PATH=${Qt6_DIR}/../gcc_64 \
-DQT_CHAINLOAD_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
Expand All @@ -159,6 +166,7 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DBUILD_SHARED_LIBS=OFF \
-DQT_HOST_PATH=${Qt6_DIR}/../gcc_64 \
-DQT_CHAINLOAD_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \
Expand Down Expand Up @@ -201,11 +209,13 @@ jobs:
-DVCPKG_TRACE_FIND_PACKAGE=ON \
-DVCPKG_VERBOSE=ON \
-DVCPKG_INSTALLED_DIR=${{env.INSTALL_DIR}}/libvncserver/vcpkg_installed \
-DANDROID_ABI=${{env.ANDROID_ABI}} \
-DINSTALL_QT=ON \
-DRABBIT_ENABLE_INSTALL_DEPENDENT=ON \
-DRABBIT_ENABLE_INSTALL_QT=ON \
-DRABBIT_ENABLE_INSTALL_TO_BUILD_PATH=ON \
-DQT_HOST_PATH=${Qt6_DIR}/../gcc_64 \
-DQT_ANDROID_SIGN_APK=ON \
-DQT_ENABLE_VERBOSE_DEPLOYMENT=ON \
-DANDROID_ABI=${{env.ANDROID_ABI}} \
-DQt6LinguistTools_DIR=${Qt6_DIR}/../gcc_64/lib/cmake/Qt6LinguistTools \
-DCMAKE_INSTALL_PREFIX=`pwd`/install
cmake --build . --verbose --config ${{matrix.BUILD_TYPE}} --target all
Expand All @@ -231,9 +241,9 @@ jobs:
- name: Update artifact
if: ${{ matrix.BUILD_TYPE == 'Release' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}}
path: |
${{github.workspace}}/build/FaceRecognizer_${{env.FaceRecognizer_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk
${{github.workspace}}/build/update_android.xml
30 changes: 21 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,44 +34,56 @@ jobs:
#if: ${{ startsWith(github.ref, 'refs/tags/') }}

deploy:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
#if: ${{ startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
needs: [ubuntu, msvc, macos, mingw, doxygen, android]
needs: [ubuntu, msvc, macos, doxygen, android]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: false

- name: Download ubuntu
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4
with:
name: ${{ needs.ubuntu.outputs.name }}
path: ${{ env.artifact_path }}
merge-multiple: true

- name: Download msvc
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4
with:
name: ${{ needs.msvc.outputs.name }}
pattern: ${{ needs.msvc.outputs.name }}*
path: ${{ env.artifact_path }}
merge-multiple: true

- name: Download mingw
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4
with:
name: ${{ needs.mingw.outputs.name }}
path: ${{ env.artifact_path }}
merge-multiple: true

- name: Download macos
uses: actions/[email protected]
uses: actions/download-artifact@v4
with:
pattern: ${{ needs.macos.outputs.name }}*
path: ${{ env.artifact_path }}
merge-multiple: true

- name: Download android
uses: actions/download-artifact@v4
with:
name: ${{ needs.macos.outputs.name }}
pattern: ${{ needs.android.outputs.name }}_*
path: ${{ env.artifact_path }}
merge-multiple: true

- name: Download doxygen
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4
with:
name: ${{ needs.doxygen.outputs.name }}
path: ${{ env.artifact_path }}
merge-multiple: true

- name: Make Note.md file
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Update artifact
if: ${{ env.BUILD_TYPE == 'Release' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: |
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
VCPKG_TARGET_TRIPLET: [x64-osx]
include:
- qt_version: 6.7.1
qt_modules: qtscxml qtpositioning qt5compat qtwebchannel qtwebsockets qtmultimedia
qt_modules: qtscxml qtpositioning qt5compat qtwebchannel qtpositioning qtmultimedia
ENABLE_DOWNLOAD_MODULE: ON

- qt_version: 5.15.2
Expand All @@ -40,7 +40,7 @@ jobs:
TOOSL_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install_2024_03_13
qt_modules: qtwebengine ${{matrix.qt_modules}}
VCPKGGITCOMMITID: 007aaced1a9d3245e28a2ba9395dca88ea890db1
VCPKGGITCOMMITID: 110c50d4700794d87d95138cd8c1b3bbfee9bab5
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
artifact_name: build_macos
FaceRecognizer_VERSION: v0.0.4
Expand Down Expand Up @@ -85,13 +85,6 @@ jobs:
run: |
brew install nasm
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1 # not v2!
with:
path: ${{env.TOOSL_DIR}}/qt
key: qt${{matrix.qt_version}}-${{matrix.qt_arch}}

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
Expand Down Expand Up @@ -178,8 +171,8 @@ jobs:
- name: Update artifact
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.7.1' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}}
path: |
${{github.workspace}}/build/FaceRecognizer_${{env.FaceRecognizer_VERSION}}_macos_qt${{matrix.qt_version}}.zip
2 changes: 1 addition & 1 deletion .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
- name: Update artifact
if: ${{ matrix.BUILD_TYPE == 'Release' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
INSTALL_DIR: ${{github.workspace}}\.cache\install_msvc_${{matrix.CMAKE_GENERATOR_PLATFORM}}_${{matrix.BUILD_TYPE}}
CMAKE_GENERATOR: "Visual Studio 17 2022"
CMAKE_GENERATOR_PLATFORM: ${{matrix.CMAKE_GENERATOR_PLATFORM}}
VCPKGGITCOMMITID: 007aaced1a9d3245e28a2ba9395dca88ea890db1
VCPKGGITCOMMITID: 110c50d4700794d87d95138cd8c1b3bbfee9bab5
VCPKG_PLATFORM_TOOLSET: ${{matrix.VCPKG_PLATFORM_TOOLSET}}
VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}}
qt_modules: qtwebengine ${{matrix.qt_modules}}
Expand Down Expand Up @@ -216,9 +216,9 @@ jobs:
- name: Update artifact
if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.7.1' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}}
path: |
${{github.workspace}}\build\FaceRecognizer_${{env.FaceRecognizer_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe
${{github.workspace}}\build\update_windows.json
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
- name: Update artifact
if: ${{ matrix.BUILD_TYPE == 'Release' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ env.artifact_name }}
path: |
Expand Down

0 comments on commit c8e5637

Please sign in to comment.