From 245e282380691990c58090d33ff4c7afd5c875ae Mon Sep 17 00:00:00 2001 From: SZinedine Date: Sat, 10 Feb 2024 16:11:57 +0100 Subject: [PATCH] Improved the gh workflows scripts --- .github/workflows/ci.yml | 27 +++++++++++++++++---------- .github/workflows/linux-release.yml | 6 ++++-- .github/workflows/windows-release.yml | 1 + 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a7dc32..112514c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,44 +1,52 @@ name: Running Tests + on: workflow_dispatch: push: - branches: [ "main" ] + branches: [ "master" ] pull_request: - branches: [ "main" ] + branches: [ "master" ] env: BUILD_TYPE: Debug + BUILD_DIR: ${{github.workspace}}/build + QT_LOC: ${{github.workspace}}/Qt QT_VERSION: 5.12.2 QT_ARCH: gcc_64 - BUILD_DIR: ${{github.workspace}}/build jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 with: submodules: recursive + - name: Set reusable strings + id: strings + shell: bash + run: | + echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + - name: Cache Qt id: cache-qt uses: actions/cache@v4 with: - path: ../Qt + path: ${{env.QT_LOC}} key: ${{runner.os}}-${{env.QT_ARCH}}-QtCache-${{env.QT_VERSION}} - - name: Install Qt uses: jurplel/install-qt-action@v3 with: - version: ${{env.QT_VERSION}} - arch: ${{env.QT_ARCH}} - aqtversion: '==2.0.0' + version: 5.15.2 + dir: ${{env.QT_LOC}} + arch: gcc_64 + aqtversion: '==3.1.11' setup-python: false cache: true @@ -50,7 +58,6 @@ jobs: - name: Build for testing run: | cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}} --parallel $(nproc) - ${{env.BUILD_DIR}}/deeptags - name: Re-Configure CMake for regular build diff --git a/.github/workflows/linux-release.yml b/.github/workflows/linux-release.yml index 685203d..6ac37ed 100644 --- a/.github/workflows/linux-release.yml +++ b/.github/workflows/linux-release.yml @@ -7,6 +7,7 @@ on: env: BUILD_DIR_PATH: ${{github.workspace}}/build + QT_LOC: ${{github.workspace}}/Qt QT_VERSION: 5.12.2 QT_ARCH: gcc_64 TAG: ${{github.ref_name}} @@ -33,15 +34,16 @@ jobs: id: cache-qt uses: actions/cache@v4 with: - path: ../Qt + path: ${{env.QT_LOC}} key: ${{runner.os}}-${{env.QT_ARCH}}-QtCache-${{env.QT_VERSION}} - name: Install Qt uses: jurplel/install-qt-action@v3 with: version: 5.15.2 + dir: ${{env.QT_LOC}} arch: gcc_64 - aqtversion: '==2.0.0' + aqtversion: '==3.1.11' setup-python: false cache: true diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index 3efa698..6c49df7 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -89,6 +89,7 @@ jobs: with: name: DeepTags-${{github.ref_name}}-win-x64.zip path: DeepTags-${{github.ref_name}}-win-x64.zip + retention-days: 1