Skip to content

Commit

Permalink
Update actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Smjert committed Jul 2, 2024
1 parent b47c503 commit ecc2c7f
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 53 deletions.
77 changes: 39 additions & 38 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 @@ -110,7 +111,7 @@ jobs:

steps:
- name: Clone the osquery repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install python pre-requisites
run: |
Expand All @@ -133,7 +134,7 @@ jobs:

steps:
- name: Clone the osquery repository
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: genwebsitejson.py
run: python3 tools/codegen/genwebsitejson.py --specs=specs/
Expand All @@ -155,7 +156,7 @@ jobs:

steps:
- name: Clone the osquery repository
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Setup the build paths
shell: bash
Expand All @@ -177,7 +178,7 @@ jobs:
echo "REL_BINARY=${rel_build_path}" >> $GITHUB_OUTPUT
- 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 @@ -216,7 +217,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 @@ -245,7 +246,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 @@ -279,7 +280,7 @@ jobs:
$run_on_host apt purge $packages_to_remove
- name: Clone the osquery repository
uses: actions/checkout@v1
uses: actions/checkout@v4

- name: Select the build job count
shell: bash
Expand Down Expand Up @@ -377,7 +378,7 @@ jobs:
chmod 666 /var/run/docker.sock
- name: Update the cache (ccache)
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ steps.build_paths.outputs.CCACHE }}

Expand All @@ -388,7 +389,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 @@ -509,42 +510,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 @@ -614,7 +615,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 @@ -628,7 +629,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 @@ -639,7 +640,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 @@ -650,7 +651,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 @@ -792,7 +793,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 @@ -804,7 +805,7 @@ jobs:
- name: Store the packaged tests for the x86_64 macOS-11 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 @@ -828,15 +829,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 @@ -892,7 +893,7 @@ jobs:

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

Expand All @@ -907,12 +908,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 @@ -922,7 +923,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 @@ -960,13 +961,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 @@ -1045,7 +1046,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 @@ -1075,7 +1076,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 @@ -1086,7 +1087,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 @@ -1097,7 +1098,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 @@ -1254,7 +1255,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 @@ -1369,21 +1370,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
Loading

0 comments on commit ecc2c7f

Please sign in to comment.