Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI workflow tweaks, action updates #3631

Merged
merged 3 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI_alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'src'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI_archlinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'src'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/CI_emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
WZ_GITHUB_REF: ${{ steps.checkout-config.outputs.WZ_GITHUB_REF }}
WZ_GITHUB_SHA: ${{ steps.checkout-config.outputs.WZ_GITHUB_SHA }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'src'
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
echo "WZ_FULL_OUTPUT_ZIP_PATH=${OUTPUT_DIR}/${OUTPUT_FILE_NAME}" >> $GITHUB_ENV

- name: 'Upload Artifact - (Archive)'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() && (matrix.upload_artifact == true) && (github.repository == 'Warzone2100/warzone2100')
with:
name: warzone2100_${{ env.WZ_BUILD_DESC }}_archive
Expand All @@ -171,7 +171,7 @@ jobs:
- name: Prep Environment
run: mkdir dl-archive
- name: Download Archive Artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'warzone2100_${{ env.WZ_BUILD_DESC }}_archive'
path: ./dl-archive
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/CI_fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'src'
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'src'
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/CI_flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
uses: docker/setup-qemu-action@v2
with:
platforms: ${{ matrix.arch }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'src'
Expand Down Expand Up @@ -246,12 +246,12 @@ jobs:
###############################################################
# Upload the .flatpak and debugsymbols artifacts
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'warzone2100_linux_flatpak_${{ matrix.arch }}'
path: ${{ steps.settings.outputs.WZ_FLATPAK_BUNDLE }}
- name: Upload debug info
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'debugsymbols_linux_flatpak_${{ matrix.arch }}'
path: |
Expand All @@ -275,7 +275,7 @@ jobs:
objdump -p flatpak_app/files/bin/warzone2100 | grep NEEDED | grep -E -v 'linux-vdso|ld-linux-' | awk 'NF == 2 { system("echo " $2 " && cp /var/lib/flatpak/runtime/org.freedesktop.Platform/${WZ_FLATPAK_TARGET_ARCH}/${WZ_FREEDESKTOP_RUNTIME_VERSION}/active/files/lib/${WZ_FLATPAK_TARGET_ARCH}-linux-gnu/" $2 " output_debug_dependency_snapshot") }'
fi
- name: Upload additional debug dependency info
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'debugdependencylibsnapshot_linux_flatpak_${{ matrix.arch }}'
path: |
Expand All @@ -299,7 +299,7 @@ jobs:
echo " -> Size (bytes): $(stat -c %s "${REPO_TAR_FILE}")"
- name: Upload ostree repo
if: success() && (github.event_name == 'release' && github.event.action == 'published')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'ostree_repo_flatpak_${{ matrix.arch }}_${{ steps.settings.outputs.WZ_FLATPAK_BRANCH }}'
path: '${{ steps.repo-tar.outputs.REPO_TAR_FILE }}'
Expand Down Expand Up @@ -327,12 +327,12 @@ jobs:
mkdir -p dl-debug/symbols
mkdir -p dl-debug/additional
- name: Download Debug Symbols
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'debugsymbols_linux_flatpak_${{ matrix.arch }}'
path: ./dl-debug/symbols
- name: Download Additional Debug Files
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'debugdependencylibsnapshot_linux_flatpak_${{ matrix.arch }}'
path: ./dl-debug/additional
Expand Down Expand Up @@ -372,7 +372,7 @@ jobs:
run: |
mkdir dl-artifacts
- name: Download Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'warzone2100_linux_flatpak_${{ matrix.arch }}'
path: ./dl-artifacts
Expand Down Expand Up @@ -444,15 +444,15 @@ jobs:
curl -Lf https://raw.githubusercontent.com/flatpak/flat-manager/master/flat-manager-client --output /usr/bin/flat-manager-client
chmod +x /usr/bin/flat-manager-client
echo "::endgroup::"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: 'src'
set-safe-directory: true
- name: Prep Environment
run: |
mkdir dl-artifacts
- name: Download Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'ostree_repo_flatpak_${{ matrix.arch }}_${{ needs.build-flatpak.outputs.WZ_FLATPAK_BRANCH }}'
path: ./dl-artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI_linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/CI_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
VCPKG_DEFAULT_TRIPLET: '${{ matrix.vcpkg_triplet }}'
ARCHS: '${{ matrix.osx_target_arch }}'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'src'
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:

echo "WZ_FULL_OUTPUT_ZIP_PATH=${OUTPUT_DIR}/${DESIRED_ZIP_NAME}" >> $GITHUB_ENV
exit 0
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success() && (matrix.publish_artifact == true)
with:
name: "warzone2100_macOS_${{ matrix.artifact_suffix }}"
Expand All @@ -215,7 +215,7 @@ jobs:
needs: macos-build
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'src'
Expand All @@ -235,7 +235,7 @@ jobs:

echo "OUTPUT_DIR=output" >> $GITHUB_ENV
- name: Download Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: ./dl-artifacts
- name: Display structure of downloaded files
Expand Down Expand Up @@ -293,7 +293,7 @@ jobs:

echo "WZ_FULL_OUTPUT_ZIP_PATH=${OUTPUT_DIR}/${DESIRED_ZIP_NAME}" >> $GITHUB_ENV
exit 0
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: "warzone2100_macOS_universal"
path: ${{ env.WZ_FULL_OUTPUT_ZIP_PATH }}
Expand Down Expand Up @@ -351,7 +351,7 @@ jobs:
echo "WZ_FULL_OUTPUT_ZIP_PATH=${OUTPUT_DIR}/${DESIRED_ZIP_NAME}" >> $GITHUB_ENV

exit 0
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: "warzone2100_macOS_universal_novideos"
path: ${{ env.WZ_FULL_OUTPUT_ZIP_PATH }}
Expand Down Expand Up @@ -383,7 +383,7 @@ jobs:
run: |
mkdir dl-archive
- name: Download Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'warzone2100_macOS_universal_novideos'
path: ./dl-archive
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/CI_snapcraft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-20.04 # Use instead of ubuntu-latest until https://github.com/snapcore/action-build/issues/42 is resolved
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Repo Checkout
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
echo " -> SHA512: $(sha512sum "${OUTPUT_DIR}/${OUTPUT_FILE_NAME}")"
echo " -> Size (bytes): $(stat -c %s "${OUTPUT_DIR}/${OUTPUT_FILE_NAME}")"
echo "WZ_FULL_OUTPUT_SNAP_PATH=${OUTPUT_DIR}/${OUTPUT_FILE_NAME}" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success()
with:
name: 'warzone2100_linux_${{ matrix.arch }}_snap'
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/CI_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
# Needed by the release + other later jobs - despite this being a matrix job, this should be the same for all, so we can allow whatever is last to persist it
WZ_GITHUB_REF: ${{ steps.checkout-config.outputs.WZ_GITHUB_REF }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'src'
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
echo " -> SHA512: $(sha512sum "${OUTPUT_DIR}/${OUTPUT_FILE_NAME}")"
echo " -> Size (bytes): $(stat -c %s "${OUTPUT_DIR}/${OUTPUT_FILE_NAME}")"
echo "WZ_FULL_OUTPUT_DEB_PATH=${OUTPUT_DIR}/${OUTPUT_FILE_NAME}" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success() && (matrix.publish_artifact == true)
with:
name: "warzone2100_${{ matrix.output-suffix }}_${{ matrix.arch }}_deb"
Expand All @@ -188,7 +188,7 @@ jobs:
WZ_EXECUTABLE_PATH="${WZ_BUILD_DIR}/src/warzone2100${WZ_OUTPUT_NAME_SUFFIX}"
objcopy --only-keep-debug "${WZ_EXECUTABLE_PATH}" "warzone2100${WZ_OUTPUT_NAME_SUFFIX}.debug"
- name: Upload debug info
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() && (matrix.publish_artifact == true)
with:
name: 'debugsymbols_${{ matrix.output-suffix }}_${{ matrix.arch }}'
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
run: |
echo "GITHUB_REF=${GITHUB_REF}"
echo "GITHUB_HEAD_REF=${GITHUB_HEAD_REF}"
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'src'
Expand Down Expand Up @@ -273,7 +273,7 @@ jobs:
echo "Generated warzone2100 tarball: \"warzone2100_src.tar.xz\""
echo " -> SHA512: $(sha512sum "${OUTPUT_DIR}/warzone2100_src.tar.xz")"
echo " -> Size (bytes): $(stat -c %s "${OUTPUT_DIR}/warzone2100_src.tar.xz")"
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success()
with:
name: warzone2100_src
Expand Down Expand Up @@ -310,7 +310,7 @@ jobs:
run: |
mkdir dl-debug-symbols
- name: Download Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'debugsymbols_${{ matrix.output-suffix }}_${{ matrix.arch }}'
path: ./dl-debug-symbols
Expand All @@ -337,7 +337,7 @@ jobs:
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, '[ci skip]')"
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Prepare Git Repo for autorevision
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/CI_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
runs-on: windows-2022
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
path: 'src'
Expand Down Expand Up @@ -534,7 +534,7 @@ jobs:
& "${env:WZ_FULL_CMAKE_PATH}\cmake.exe" -DCMAKE_C_COMPILER="${env:WZ_MINGW_PKG_PREFIX}-gcc" -DCMAKE_CXX_COMPILER="${env:WZ_MINGW_PKG_PREFIX}-g++" -DCMAKE_RC_COMPILER="${env:WZ_MINGW_PKG_PREFIX}-windres" -DCMAKE_ASM_MASM_COMPILER="${env:WZ_ASM_MASM_COMPILER}" -DWZ_MINGW_DIST_PATH="${env:WZ_MINGW_DIST_PATH}" -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\build\vcpkg\scripts\buildsystems\vcpkg.cmake" -DCMAKE_BUILD_TYPE=Release -DWZ_DISTRIBUTOR:STRING="${env:WZ_DISTRIBUTOR}" -DDISCORD_RPC_APPID:STRING="${env:DISCORD_RPC_APPID}" -DWZ_BUILD_SENTRY:BOOL=${WZ_BUILD_SENTRY_VALUE} ${SENTRY_DSN_PARAM} ${SENTRY_BACKEND_PARAM} -G "Ninja" "${{ steps.settings.outputs.WZ_REPO_PATH }}"
echo "::remove-matcher owner=cmake::"
- name: Upload vcpkg logs (on failure)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: win_${{ matrix.architecture }}_vcpkg_logs
Expand Down Expand Up @@ -582,7 +582,7 @@ jobs:
Copy-Item -LiteralPath "$NSIS_Log" -Destination ".\output\error_logs"
}
- name: Upload Failure Logs Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: win_${{ matrix.architecture }}_error_logs
Expand Down Expand Up @@ -634,28 +634,28 @@ jobs:
# Upload build artifacts
#####################################################
- name: 'Upload Artifact - (Portable Build)'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() && (github.repository == 'Warzone2100/warzone2100')
with:
name: warzone2100_${{ steps.settings.outputs.WZ_BUILD_DESC }}_portable
path: '${{ github.workspace }}\output\portable'
if-no-files-found: 'error'
- name: 'Upload Artifact - (Regular Installer)'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() && (github.repository == 'Warzone2100/warzone2100')
with:
name: warzone2100_${{ steps.settings.outputs.WZ_BUILD_DESC }}_installer
path: '${{ github.workspace }}\output\installer'
if-no-files-found: 'error'
- name: 'Upload Artifact - (Debug Symbols)'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() && (github.repository == 'Warzone2100/warzone2100')
with:
name: warzone2100_${{ steps.settings.outputs.WZ_BUILD_DESC }}_DEBUGSYMBOLS
path: '${{ github.workspace }}\output\debugsymbols'
if-no-files-found: 'error'
- name: 'Upload Artifact - (Archive)'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success() && ((github.event_name == 'push' && github.ref == 'refs/heads/master') || (github.event_name == 'workflow_run' && github.event.workflow_run.name == 'Draft Tag Release')) && (matrix.deploy_release == true) && (github.repository == 'Warzone2100/warzone2100')
with:
name: warzone2100_${{ steps.settings.outputs.WZ_BUILD_DESC }}_archive
Expand Down Expand Up @@ -713,7 +713,7 @@ jobs:
Get-ChildItem -Path "${env:SOURCE_BUNDLE_OUTPUT_DIR}" -Recurse
- name: Upload Sentry source bundles
if: success() && (github.repository == 'Warzone2100/warzone2100') && (matrix.support_sentry == true) && (steps.settings.outputs.WZ_ENABLE_SENTRY == 'true') && (steps.create-sentry-source-bundle.outcome == 'success')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'warzone2100_${{ steps.settings.outputs.WZ_BUILD_DESC }}_debug_sourcebundles'
path: '${{ github.workspace }}\output\sentry_source_bundles'
Expand Down Expand Up @@ -746,7 +746,7 @@ jobs:
echo "OUTPUTDIR=${OUTPUTDIR}" >> $GITHUB_ENV
echo "ARCHIVEDIR=${OUTPUTDIR}" >> $GITHUB_OUTPUT
- name: Download Archive Artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'warzone2100_win_${{ matrix.architecture }}_archive'
path: ./dl-archive
Expand All @@ -756,7 +756,7 @@ jobs:
unzip -o "${ZIPFILE}" -d "${OUTPUTDIR}" && rm "${ZIPFILE}"
- name: Download Debug Symbols Artifact
continue-on-error: true
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'warzone2100_win_${{ matrix.architecture }}_DEBUGSYMBOLS'
path: ./dl-archive
Expand All @@ -775,7 +775,7 @@ jobs:
fi
- name: Download Source Bundle
continue-on-error: true
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: 'warzone2100_win_${{ matrix.architecture }}_debug_sourcebundles'
path: ./dl-sourcebundle
Expand Down
Loading
Loading