Skip to content
Open
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
48 changes: 43 additions & 5 deletions .github/workflows/advanced.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ on:
description: 'OpenSSL branch to test'
required: false
default: 'fix-tests'
upload_artifacts:
description: 'Upload artifacts'
required: false
default: false
workflow_call:
inputs:
binutils_branch:
Expand All @@ -53,6 +57,8 @@ on:
type: string
cocom_branch:
type: string
upload_artifacts:
type: boolean
outputs:
toolchain-package-name:
value: ${{ jobs.build-toolchain.outputs.toolchain-package-name }}
Expand Down Expand Up @@ -124,6 +130,7 @@ env:

CCACHE: 1
DELETE_BUILD: 1
UPLOAD_ARTIFACTS: ${{ inputs.upload_artifacts || 'false' }}

jobs:
build-toolchain:
Expand Down Expand Up @@ -369,15 +376,15 @@ jobs:
.github/scripts/toolchain/pack-runtime.sh

- name: Upload build folder
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && failure() }}
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && env.UPLOAD_ARTIFACTS == 'true' && failure() }}
Copy link
Member

@Blackhex Blackhex Jan 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build folder is uploaded for the reason of debugging when build fails. This should not happen that frequently. If its size is still a problem remove the step entirely as with default false is not usefull at all.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be useful when UPLOAD_ARTIFACTS is true and it can be used for debugging.

uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_ARTIFACT_NAME }}
retention-days: 1
path: ${{ env.BUILD_PATH }}

- name: Upload toolchain artifact
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && env.PACK_TOOLCHAIN == 'true' }}
if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' && env.UPLOAD_ARTIFACTS == 'true' && env.PACK_TOOLCHAIN == 'true' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.TOOLCHAIN_ARTIFACT_NAME }}
Expand Down Expand Up @@ -697,6 +704,14 @@ jobs:
with:
path: ${{ github.workspace }}

- name: Cache OpenSSL tests
id: cache-openssl-tests
uses: actions/cache@v4
with:
path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_NAME }}-openssl-tests.zip
key: ${{ needs.build-toolchain.outputs.toolchain-cache-key }}-openssl-tests
enableCrossOsArchive: true

- name: Checkout OpenSSL
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -743,13 +758,15 @@ jobs:
.github/scripts/openssl/pack-tests.sh

- name: Upload artifact
if: ${{ env.UPLOAD_ARTIFACTS == 'true' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.TOOLCHAIN_NAME }}-openssl
path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_NAME }}-openssl.zip
retention-days: 3

- name: Upload tests artifact
if: ${{ env.UPLOAD_ARTIFACTS == 'true' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.TOOLCHAIN_NAME }}-openssl-tests
Expand Down Expand Up @@ -793,6 +810,15 @@ jobs:
enableCrossOsArchive: true
fail-on-cache-miss: true

- name: Download OpenSSL tests
uses: actions/cache/restore@v4
with:
path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.TOOLCHAIN_NAME }}-openssl-tests.zip
key: ${{ needs.build-toolchain.outputs.toolchain-cache-key }}-openssl-tests
restore-keys: ${{ needs.build-toolchain.outputs.toolchain-cache-key }}-openssl-tests
enableCrossOsArchive: true
fail-on-cache-miss: true

- name: Download OpenSSL tests
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -942,6 +968,14 @@ jobs:
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}

- name: Cache FFmpeg tests
id: cache-ffmpeg-tests
uses: actions/cache@v4
with:
path: ${{ env.ARTIFACT_PATH }}/${{ env.TOOLCHAIN_NAME }}-ffmpeg-tests.zip
key: ${{ needs.build-toolchain.outputs.toolchain-cache-key }}-ffmpeg-tests
enableCrossOsArchive: true

- name: Checkout FFmpeg
uses: actions/checkout@v4
Expand Down Expand Up @@ -976,6 +1010,7 @@ jobs:
.github/scripts/ffmpeg/pack-tests.sh

- name: Upload tests artifact
if: ${{ env.UPLOAD_ARTIFACTS == 'true' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.TOOLCHAIN_NAME }}-ffmpeg-tests
Expand Down Expand Up @@ -1025,10 +1060,13 @@ jobs:
fail-on-cache-miss: true

- name: Download FFmpeg tests
uses: actions/download-artifact@v4
uses: actions/cache/restore@v4
with:
name: ${{ env.TOOLCHAIN_NAME }}-ffmpeg-tests
path: ${{ env.ARTIFACT_PATH }}
path: ${{ env.RELATIVE_ARTIFACT_PATH }}/${{ env.TOOLCHAIN_NAME }}-ffmpeg-tests.zip
key: ${{ needs.build-toolchain.outputs.toolchain-cache-key }}-ffmpeg-tests
restore-keys: ${{ needs.build-toolchain.outputs.toolchain-cache-key }}-ffmpeg-tests
enableCrossOsArchive: true
fail-on-cache-miss: true

- name: Unpack ${{ env.TOOLCHAIN_NAME }} runtime
run: |
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
description: 'Mingw branch to build'
required: false
default: 'woarm64'
upload_artifacts:
description: 'Upload artifacts'
required: false
default: false
env:
BINUTILS_BRANCH: ${{ inputs.binutils_branch || 'woarm64' }}
GCC_BRANCH: ${{ inputs.gcc_branch || 'woarm64' }}
Expand All @@ -30,6 +34,7 @@ env:

CCACHE: 1
DELETE_BUILD: 1
UPLOAD_ARTIFACTS: ${{ inputs.upload_artifacts || 'false' }}

jobs:
build-toolchain:
Expand Down Expand Up @@ -67,14 +72,15 @@ jobs:
key: main-gcc-ccache-${{ steps.get-cache-key.outputs.timestamp }}

- name: Upload build folder
if: failure()
if: ${{ env.UPLOAD_ARTIFACTS == 'true' && failure() }}
uses: actions/upload-artifact@v4
with:
name: main-aarch64-w64-mingw32-build
retention-days: 1
path: ${{ env.BUILD_PATH }}

- name: Upload artifact
if: ${{ env.UPLOAD_ARTIFACTS == 'true' }}
uses: actions/upload-artifact@v4
with:
name: main-aarch64-w64-mingw32-toolchain
Expand Down
Loading