Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Smjert committed Jul 8, 2024
1 parent 02a883d commit e314597
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 43 deletions.
69 changes: 35 additions & 34 deletions .github/workflows/hosted_runners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ on:
branches:
- 'master'
- 'main'
- 'stefano/ci/update-actions'

tags:
- '*'
Expand Down Expand Up @@ -172,7 +173,7 @@ jobs:
fetch-depth: 0

- name: Update the cache (git submodules)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.build_paths.outputs.SOURCE }}/.git/modules

Expand Down Expand Up @@ -211,7 +212,7 @@ jobs:
cmake --build . --target cppcheck 2>&1 | tee cppcheck_release.txt
- name: Store the cppcheck log (Release)
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: cppcheck-release
path: ${{ steps.build_paths.outputs.REL_BINARY }}/cppcheck_release.txt
Expand Down Expand Up @@ -240,7 +241,7 @@ jobs:
cmake --build . --target cppcheck 2>&1 | tee cppcheck_debug.txt
- name: Store the cppcheck log (Debug)
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: cppcheck-debug
path: ${{ steps.build_paths.outputs.REL_BINARY }}/cppcheck_debug.txt
Expand Down Expand Up @@ -353,7 +354,7 @@ jobs:
git checkout ${{ env.PACKAGING_COMMIT }}
- name: Update the cache (ccache)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.build_paths.outputs.CCACHE }}

Expand All @@ -364,7 +365,7 @@ jobs:
ccache_${{ matrix.os }}_${{ matrix.build_type }}
- name: Update the cache (git submodules)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.build_paths.outputs.SOURCE }}/.git/modules

Expand Down Expand Up @@ -477,42 +478,42 @@ jobs:
- name: Store the unsigned release package data artifact
if: matrix.build_type == 'RelWithDebInfo'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: linux_unsigned_release_package_data
path: ${{ steps.packages.outputs.REL_UNSIGNED_RELEASE_PACKAGE_DATA_PATH }}

- name: Store the unsigned release DEB artifact
if: matrix.build_type == 'RelWithDebInfo'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: linux_unsigned_release_deb
path: ${{ steps.packages.outputs.REL_UNSIGNED_RELEASE_DEB_PATH }}

- name: Store the unsigned debug DEB artifact
if: matrix.build_type == 'RelWithDebInfo'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: linux_unsigned_debug_deb
path: ${{ steps.packages.outputs.REL_UNSIGNED_DEBUG_DEB_PATH }}

- name: Store the unsigned release RPM artifact
if: matrix.build_type == 'RelWithDebInfo'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: linux_unsigned_release_rpm
path: ${{ steps.packages.outputs.REL_UNSIGNED_RELEASE_RPM_PATH }}

- name: Store the unsigned debug RPM artifact
if: matrix.build_type == 'RelWithDebInfo'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: linux_unsigned_debug_rpm
path: ${{ steps.packages.outputs.REL_UNSIGNED_DEBUG_RPM_PATH }}

- name: Store the unsigned release TGZ artifact
if: matrix.build_type == 'RelWithDebInfo'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: linux_unsigned_release_tgz
path: ${{ steps.packages.outputs.REL_UNSIGNED_RELEASE_TGZ_PATH }}
Expand Down Expand Up @@ -578,7 +579,7 @@ jobs:
echo "PACKAGE_BUILD=$(pwd)/${rel_package_build_path}" >> $GITHUB_OUTPUT
- name: Clone the osquery repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
path: ${{ steps.build_paths.outputs.REL_SOURCE }}
Expand All @@ -592,7 +593,7 @@ jobs:
vm_stat
- name: Update the cache (ccache)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.build_paths.outputs.CCACHE }}

Expand All @@ -603,7 +604,7 @@ jobs:
ccache_${{ matrix.os }}_${{ matrix.architecture }}_${{ matrix.build_type }}
- name: Update the cache (git submodules)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.build_paths.outputs.SOURCE }}/.git/modules

Expand All @@ -614,7 +615,7 @@ jobs:
gitmodules_${{ matrix.os }}_${{ matrix.architecture }}_${{env.SUBMODULE_CACHE_VERSION}}
- name: Update the cache (downloads)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.build_paths.outputs.DOWNLOADS }}

Expand Down Expand Up @@ -756,7 +757,7 @@ jobs:
- name: Store the ${{ matrix.architecture }} unsigned release package data artifact
if: matrix.build_type == 'Release'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: macos_unsigned_release_package_data_${{ matrix.architecture }}
path: ${{ steps.packages.outputs.REL_UNSIGNED_RELEASE_PACKAGE_DATA_PATH }}
Expand All @@ -770,7 +771,7 @@ jobs:
- name: Store the packaged tests for the x86_64 macOS-12 worker
if: matrix.architecture == 'x86_64'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: macos_tests_${{ matrix.build_type }}
path: workspace/macos_tests_${{ matrix.build_type }}.tar.gz
Expand All @@ -794,15 +795,15 @@ jobs:

steps:
- name: Clone the osquery repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: macos_tests_Release

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: macos_tests_Debug

Expand Down Expand Up @@ -858,7 +859,7 @@ jobs:

steps:
- name: Clone the osquery repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -873,12 +874,12 @@ jobs:
"workspace/install" \
"3.21.4"
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: macos_unsigned_release_package_data_x86_64
path: macos_unsigned_release_package_data_x86_64

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: macos_unsigned_release_package_data_arm64
path: macos_unsigned_release_package_data_arm64
Expand All @@ -888,7 +889,7 @@ jobs:
tools/ci/scripts/macos/build_universal_package_data.sh
- name: Store the universal unsigned release package data artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: macos_unsigned_release_package_data_universal
path: package_data.tar.gz
Expand Down Expand Up @@ -926,13 +927,13 @@ jobs:
echo "REL_UNSIGNED_RELEASE_TGZ_PATH=$(ls package_build/*.tar.gz)" >> $GITHUB_OUTPUT
- name: Store the PKG unsigned release packages
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: macos_unsigned_pkg_universal
path: ${{ steps.packages.outputs.REL_UNSIGNED_RELEASE_PKG_PATH }}

- name: Store the TGZ unsigned release packages
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: macos_unsigned_tgz_universal
path: ${{ steps.packages.outputs.REL_UNSIGNED_RELEASE_TGZ_PATH }}
Expand Down Expand Up @@ -1011,7 +1012,7 @@ jobs:
git config --global core.symlinks true
- name: Clone the osquery repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
path: ${{ steps.build_paths.outputs.REL_SOURCE }}
Expand Down Expand Up @@ -1041,7 +1042,7 @@ jobs:
git checkout ${{ env.PACKAGING_COMMIT }}
- name: Update the cache (git submodules)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.build_paths.outputs.SOURCE }}\.git\modules

Expand All @@ -1052,7 +1053,7 @@ jobs:
gitmodules_${{ matrix.os }}_${{env.SUBMODULE_CACHE_VERSION}}
- name: Update the cache (downloads)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.build_paths.outputs.DOWNLOADS }}

Expand All @@ -1063,7 +1064,7 @@ jobs:
downloads_${{ matrix.os }}
- name: Initialize the Python 3 installation
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.x"
architecture: "x64"
Expand Down Expand Up @@ -1220,7 +1221,7 @@ jobs:
echo "COMPILER_VERSION=$version" >> $env:GITHUB_OUTPUT
- name: Update the cache (sccache)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.build_paths.outputs.SCCACHE }}

Expand Down Expand Up @@ -1335,21 +1336,21 @@ jobs:
echo "REL_UNSIGNED_RELEASE_NUPKG_PATH=$(ls *.nupkg)" >> $GITHUB_OUTPUT
- name: Store the unsigned release package data artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: windows${{ matrix.bitness }}_unsigned_release_package_data
path: ${{ steps.packages.outputs.REL_UNSIGNED_RELEASE_PACKAGE_DATA_PATH }}

- name: Store the unsigned release MSI artifact
if: matrix.bitness != 'arm64'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: windows${{ matrix.bitness }}_unsigned_release_msi
path: ${{ steps.packages.outputs.REL_UNSIGNED_RELEASE_MSI_PATH }}

- name: Store the unsigned release NUPKG artifact
if: matrix.bitness != 'arm64'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: windows${{ matrix.bitness }}_unsigned_release_nupkg
path: ${{ steps.packages.outputs.REL_UNSIGNED_RELEASE_NUPKG_PATH }}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/self_hosted_runners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:

steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.EC2_GITHUB_RUNNER_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.EC2_GITHUB_RUNNER_AWS_SECRET_ACCESS_KEY }}
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
git checkout ${{ env.PACKAGING_COMMIT }}
- name: Update the cache (ccache)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.build_paths.outputs.CCACHE }}

Expand All @@ -293,7 +293,7 @@ jobs:
ccache_${{ matrix.cache_key }}_${{ matrix.build_type }}
- name: Update the cache (git submodules)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.build_paths.outputs.SOURCE }}/.git/modules

Expand Down Expand Up @@ -409,42 +409,42 @@ jobs:
- name: Store the unsigned release package data artifact
if: matrix.build_type == 'RelWithDebInfo'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: linux_unsigned_release_package_data_aarch64
path: ${{ steps.packages.outputs.REL_UNSIGNED_RELEASE_PACKAGE_DATA_PATH }}

- name: Store the unsigned release DEB artifact
if: matrix.build_type == 'RelWithDebInfo'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: linux_unsigned_release_deb_aarch64
path: ${{ steps.packages.outputs.REL_UNSIGNED_RELEASE_DEB_PATH }}

- name: Store the unsigned debug DEB artifact
if: matrix.build_type == 'RelWithDebInfo'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: linux_unsigned_debug_deb_aarch64
path: ${{ steps.packages.outputs.REL_UNSIGNED_DEBUG_DEB_PATH }}

- name: Store the unsigned release RPM artifact
if: matrix.build_type == 'RelWithDebInfo'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: linux_unsigned_release_rpm_aarch64
path: ${{ steps.packages.outputs.REL_UNSIGNED_RELEASE_RPM_PATH }}

- name: Store the unsigned debug RPM artifact
if: matrix.build_type == 'RelWithDebInfo'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: linux_unsigned_debug_rpm_aarch64
path: ${{ steps.packages.outputs.REL_UNSIGNED_DEBUG_RPM_PATH }}

- name: Store the unsigned release TGZ artifact
if: matrix.build_type == 'RelWithDebInfo'
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: linux_unsigned_release_tgz_aarch64
path: ${{ steps.packages.outputs.REL_UNSIGNED_RELEASE_TGZ_PATH }}
Expand Down

0 comments on commit e314597

Please sign in to comment.