From 546a1f118f5546a36653fc07490a15bdfa86b023 Mon Sep 17 00:00:00 2001 From: Angelo Theodorou Date: Sun, 10 Sep 2023 16:51:02 +0200 Subject: [PATCH] Changes to the GitHub Actions workflow files - Select the correct nCine archive after cloning the artifacts - Use Java 17 when running Gradle for Android on the GitHub runner - Update GitHub checkout action to version 4 --- .github/workflows/android.yml | 6 +++--- .github/workflows/codeql-analysis.yml | 4 ++-- .github/workflows/emscripten.yml | 4 ++-- .github/workflows/linux.yml | 4 ++-- .github/workflows/macos.yml | 6 +++--- .github/workflows/mingw.yml | 4 ++-- .github/workflows/windows.yml | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 221fd2a..836cf0b 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -23,7 +23,7 @@ jobs: steps: - name: 'Checkout Code' - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: 'Unshallow Git Repository for Versioning' run: | @@ -56,7 +56,7 @@ jobs: cd nCine-artifacts git checkout $NCINE_BRANCH - NCINE_FILE=$(ls -t | head -n 1) + NCINE_FILE=$(ls -t nCine-* | head -n 1) tar xpzf $NCINE_FILE mv "${NCINE_FILE/.tar.gz/}" ../nCine @@ -73,7 +73,7 @@ jobs: - name: 'Gradle Assemble' run: | - export JAVA_HOME=$JAVA_HOME_11_X64 + export JAVA_HOME=$JAVA_HOME_17_X64 export PROJECT_NAME=${GITHUB_REPOSITORY##*/} cd ../$PROJECT_NAME-build-${{ matrix.BuildType }}/android gradle assemble${{ matrix.BuildType }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 34cad5f..57a0f60 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -19,7 +19,7 @@ jobs: steps: - name: 'Checkout Repository' - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: 'Initialize CodeQL' uses: github/codeql-action/init@v1 @@ -53,7 +53,7 @@ jobs: cd nCine-artifacts git checkout $NCINE_BRANCH - NCINE_FILE=$(ls -t | head -n 1) + NCINE_FILE=$(ls -t nCine-* | head -n 1) tar xpzf $NCINE_FILE mv "${NCINE_FILE/.tar.gz/}" ../nCine diff --git a/.github/workflows/emscripten.yml b/.github/workflows/emscripten.yml index ca46ffc..5a4c414 100644 --- a/.github/workflows/emscripten.yml +++ b/.github/workflows/emscripten.yml @@ -23,7 +23,7 @@ jobs: steps: - name: 'Checkout Code' - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: 'Install Emscripten SDK' run: | @@ -67,7 +67,7 @@ jobs: cd nCine-artifacts git checkout $NCINE_BRANCH - NCINE_FILE=$(ls -t | head -n 1) + NCINE_FILE=$(ls -t nCine-* | head -n 1) tar xpzf $NCINE_FILE mv nCine-*-Emscripten ../nCine diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 9d1b248..fdda2b7 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -46,7 +46,7 @@ jobs: steps: - name: 'Checkout Code' - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: 'Unshallow Git Repository for Versioning' if: matrix.BuildType == 'BinDist' @@ -80,7 +80,7 @@ jobs: cd nCine-artifacts git checkout $NCINE_BRANCH - NCINE_FILE=$(ls -t | head -n 1) + NCINE_FILE=$(ls -t nCine-* | head -n 1) tar xpzf $NCINE_FILE mv "${NCINE_FILE/.tar.gz/}" ../nCine diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 528b30f..ae91f95 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -23,7 +23,7 @@ jobs: steps: - name: 'Checkout Code' - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: 'Unshallow Git Repository for Versioning' if: matrix.BuildType == 'BinDist' @@ -57,8 +57,8 @@ jobs: cd nCine-artifacts git checkout $NCINE_BRANCH - NCINE_FILE=$(ls -t | head -n 1) - hdiutil convert *.dmg -format UDTO -o nCine + NCINE_FILE=$(ls -t nCine-*.dmg | head -n 1) + hdiutil convert $NCINE_FILE -format UDTO -o nCine hdiutil attach -readonly nCine.cdr cp -Rp /Volumes/nCine-*-Darwin/nCine.app .. hdiutil detach /Volumes/nCine-*-Darwin; diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 9c62b21..c605412 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -46,7 +46,7 @@ jobs: steps: - name: 'Checkout Code' - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: 'Update MSYS2' run: | @@ -91,7 +91,7 @@ jobs: $env:NCINE_SOURCE_BRANCH = $env:NCINE_SOURCE_BRANCH -creplace "BRANCH_NAME","$env:branch_name" $env:NCINE_BRANCH = $env:NCINE_BRANCH -creplace "BRANCH_NAME","$env:ncine_source_branch" -creplace "OS","mingw64" -creplace "COMPILER",$env:CC git checkout $env:NCINE_BRANCH - $env:NCINE_FILE = Get-ChildItem -Path $(pwd) -Name -File | Select-Object -First 1 + $env:NCINE_FILE = Get-ChildItem -Path $(pwd) -Filter nCine-*.tar.gz -Name -File | Select-Object -First 1 7z x $env:NCINE_FILE $env:NCINE_FILE = $env:NCINE_FILE -creplace ".gz","" 7z x $env:NCINE_FILE -aos diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1715b2a..c1dc127 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -24,7 +24,7 @@ jobs: steps: - name: 'Checkout Code' - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: 'Unshallow Git Repository for Versioning' if: matrix.BuildType == 'BinDist' @@ -63,7 +63,7 @@ jobs: $env:NCINE_SOURCE_BRANCH = $env:NCINE_SOURCE_BRANCH -creplace "BRANCH_NAME","$env:branch_name" $env:NCINE_BRANCH = $env:NCINE_BRANCH -creplace "BRANCH_NAME","$env:ncine_source_branch" -creplace "OS","windows" -creplace "COMPILER",$env:vsversion git checkout $env:NCINE_BRANCH - $env:NCINE_FILE = Get-ChildItem -Path $(pwd) -Filter *.zip -Name -File | Select-Object -First 1 + $env:NCINE_FILE = Get-ChildItem -Path $(pwd) -Filter nCine-*.zip -Name -File | Select-Object -First 1 7z x $env:NCINE_FILE $env:NCINE_DIR = $env:NCINE_FILE -creplace ".zip",""