Skip to content

Commit

Permalink
Update Github Action to Node.js 20 (#757)
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev authored Feb 5, 2024
1 parent 9fb4fbd commit 35d77c5
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 111 deletions.
10 changes: 5 additions & 5 deletions .github/actions/codeql/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ runs:
rpm
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ inputs.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -68,7 +68,7 @@ runs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -81,7 +81,7 @@ runs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ inputs.language }}"
upload: false
Expand All @@ -96,6 +96,6 @@ runs:
output: sarif-results/${{ inputs.language }}.sarif

- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sarif-results/${{ inputs.language }}.sarif
4 changes: 2 additions & 2 deletions .github/workflows/image-builder-from-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
sudo apt install coreutils p7zip-full qemu-user-static
- name: Checkout CustomPiOS
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: 'guysoft/CustomPiOS'
path: CustomPiOS
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
echo "image=$IMAGE" >> $GITHUB_OUTPUT
# artifact upload will take care of zipping for us
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.copy.outputs.image }}
path: ${{ steps.copy.outputs.image }}.img
137 changes: 40 additions & 97 deletions .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
platform: linux
steps:
# checkout
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -87,7 +87,7 @@ jobs:
# download cache
- name: ccache cache files
if: ( env.USE_CACHE == '1' )
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .ccache
key: ${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
Expand All @@ -113,14 +113,15 @@ jobs:
# Upload artifacts (only on tagged commit)
- name: Upload artifacts
if: startsWith(github.event.ref, 'refs/tags') && github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release-artifact-${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}
path: deploy/Hyper*

# Upload artifacts from commit
- name: Upload artifacts from commit
if: (startsWith(github.event.ref, 'refs/tags') != true) && github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Linux-${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}-installer
path: |
Expand All @@ -129,88 +130,26 @@ jobs:
deploy/Hyper*.rpm
######################
### macOS (arm64) ####
######################

macOS_arm64:
name: macOS (arm64)
runs-on: macos-14
env:
QT_VERSION: "6"
steps:
# Checkout
- uses: actions/checkout@v3
with:
submodules: true

# Generate cache id
- name: Prepare ccache timestamp
if: env.USE_CACHE == '1'
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H-%M-%S" UTC)
file(APPEND "$ENV{GITHUB_OUTPUT}" "timestamp=${current_date}")
# Download cache
- name: ccache cache files
if: ( env.USE_CACHE == '1' )
uses: actions/cache@v3
with:
path: .ccache
key: macOS_arm64-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: macOS_arm64-ccache-

# Install deps
- name: Install deps
shell: bash
run: brew install qt@${{ env.QT_VERSION }} xz ccache zstd webp jpeg-turbo || true

# Set env
- name: Set QT5 env
if: ( env.QT_VERSION == '5' )
shell: bash
run: |
export Qt5_DIR=`brew --prefix qt5`;
echo "Qt5_DIR=$Qt5_DIR" >> $GITHUB_ENV
# Build process
- name: Build packages
env:
PLATFORM: osx
USE_CCACHE: ${{ env.USE_CACHE }}
RESET_CACHE: ${{ env.RESET_CACHE }}
shell: bash
run: ./.ci/ci_build.sh

# Upload artifacts (only on tagged commit)
- name: Upload artifacts
if: startsWith(github.event.ref, 'refs/tags') && github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
with:
path: build/Hyper*.dmg

# Upload artifacts from commit
- name: Upload artifacts from commit
if: (startsWith(github.event.ref, 'refs/tags') != true) && github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
with:
name: Apple_macOS_arm64_DMG_installer
path: build/Hyper*.dmg


######################
##### macOS (x86) ####
######## macOS #######
######################

macOS:
name: macOS
runs-on: macos-13
env:
QT_VERSION: "5"
name: ${{ matrix.JOB_NAME }}
runs-on: ${{ matrix.JOB_RUNNER }}
strategy:
matrix:
include:
- JOB_RUNNER: macos-14
JOB_NAME: macOS 14 (arm64/M1/M2)
QT_VERSION: 6
NICE_NAME: arm64_M1
- JOB_RUNNER: macos-13
JOB_NAME: macOS 13 (x64)
QT_VERSION: 5
NICE_NAME: x64
steps:
# Checkout
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -226,20 +165,20 @@ jobs:
# Download cache
- name: ccache cache files
if: ( env.USE_CACHE == '1' )
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .ccache
key: macOS-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: macOS-ccache-
key: macOS-ccache-${{ matrix.NICE_NAME }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: macOS-ccache-${{ matrix.NICE_NAME }}

# Install deps
- name: Install deps
shell: bash
run: brew install qt@${{ env.QT_VERSION }} xz ccache zstd webp jpeg-turbo || true
run: brew install qt@${{ matrix.QT_VERSION }} xz ccache zstd webp jpeg-turbo || true

# Set env
- name: Set QT5 env
if: ( env.QT_VERSION == '5' )
if: ( matrix.QT_VERSION == 5 )
shell: bash
run: |
export Qt5_DIR=`brew --prefix qt5`;
Expand All @@ -257,16 +196,17 @@ jobs:
# Upload artifacts (only on tagged commit)
- name: Upload artifacts
if: startsWith(github.event.ref, 'refs/tags') && github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release-artifact-${{ matrix.JOB_RUNNER }}
path: build/Hyper*.dmg

# Upload artifacts from commit
- name: Upload artifacts from commit
if: (startsWith(github.event.ref, 'refs/tags') != true) && github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Apple_macOS_x64_DMG_installer
name: Apple_macOS_@${{ matrix.NICE_NAME }}_DMG_installer
path: build/Hyper*.dmg

######################
Expand All @@ -281,12 +221,12 @@ jobs:
QT_VERSION: 6.5.3
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

- name: Cache Qt
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-qt-windows
with:
path: ${{ runner.workspace }}/Qt
Expand Down Expand Up @@ -315,14 +255,15 @@ jobs:
# Upload artifacts (only on tagged commit)
- name: Upload artifacts
if: startsWith(github.event.ref, 'refs/tags') && github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release-artifact-${{ matrix.runs-on }}
path: build/Hyper*

# Upload artifacts from commit
- name: Upload artifacts from commit
if: (startsWith(github.event.ref, 'refs/tags') != true) && github.event_name != 'pull_request'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Windows_x64_setup
path: build/Hyper*.exe
Expand All @@ -347,7 +288,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -363,13 +304,13 @@ jobs:
publish:
name: Publish Releases
if: startsWith(github.event.ref, 'refs/tags') && github.event_name != 'pull_request'
needs: [Linux, windows, macOS, macOS_arm64]
needs: [Linux, windows, macOS]
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

# generate environment variables
- name: Generate environment variables from version and tag
Expand All @@ -385,9 +326,11 @@ jobs:

# Download artifacts from previous build process
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: artifacts
pattern: release-artifact-*
merge-multiple: true

# create draft release and upload artifacts
- name: Create draft release
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/upload-to-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:

steps:
# checkout
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -84,7 +84,7 @@ jobs:
# download cache
- name: ccache cache files
if: ( env.USE_CACHE == '1' )
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .ccache
key: ${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
Expand Down Expand Up @@ -118,9 +118,9 @@ jobs:
rm -r repo/pool/ArchLinux ||:
- name: Upload artifacts from commit
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: upload
name: release-artifact-${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}
path: repo

Upload:
Expand All @@ -130,13 +130,15 @@ jobs:

steps:
# Download artifacts from previous build process
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: false
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: repo
path: repo
pattern: release-artifact-*
merge-multiple: true
- name: Deploy the packages
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down

0 comments on commit 35d77c5

Please sign in to comment.