Skip to content

Commit

Permalink
fix(docker): update GCC vs GCC5 also in examples
Browse files Browse the repository at this point in the history
Signed-off-by: AtomicFS <vojtech.vesely@9elements.com>
  • Loading branch information
AtomicFS committed Sep 27, 2024
1 parent ae4878a commit b15251d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ jobs:
- name: Move my defconfig into place (filename must not contain '.defconfig')
run: |
mv "tests/coreboot_${{ matrix.coreboot-version }}/seabios.defconfig" "seabios_defconfig"
- name: firmware-action
uses: ./
# uses: 9elements/firmware-action
Expand All @@ -131,6 +132,7 @@ jobs:
compile: ${{ needs.changes.outputs.action }}
env:
COREBOOT_VERSION: ${{ matrix.coreboot-version }}

- name: Get artifacts
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -184,6 +186,7 @@ jobs:
- name: Move my defconfig into place (filename must not contain '.defconfig')
run: |
mv "tests/linux_${{ matrix.linux-version }}/linux.defconfig" "ci_defconfig"
- name: firmware-action
uses: ./
# uses: 9elements/firmware-action
Expand All @@ -194,6 +197,7 @@ jobs:
compile: ${{ needs.changes.outputs.action }}
env:
LINUX_VERSION: ${{ matrix.linux-version }}

- name: Get artifacts
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -237,6 +241,23 @@ jobs:
path: ./Edk2
key: edk2-${{ matrix.edk2-version }}

- name: Get versions of edk2
id: edk2_versions
run: |
echo "ver_current=$( echo ${{ matrix.edk2-version }} | tr -cd '0-9' )" >> "${GITHUB_OUTPUT}"
echo "ver_breaking=$( echo 'edk2-stable202305' | tr -cd '0-9' )" >> "${GITHUB_OUTPUT}"
- name: Use GCC5 for old edk2
id: gcc_toolchain
# GCC5 is deprecated since edk2-stable202305
# For more information see https://github.com/9elements/firmware-action/issues/340
run: |
if [[ ! ${{ steps.edk2_versions.outputs.ver_current }} < ${{ steps.edk2_versions.outputs.ver_breaking }} ]]; then
echo "gcc_toolchain_version=GCC" >> "${GITHUB_OUTPUT}"
else
echo "gcc_toolchain_version=GCC5" >> "${GITHUB_OUTPUT}"
fi
- name: firmware-action
uses: ./
# uses: 9elements/firmware-action
Expand All @@ -247,6 +268,8 @@ jobs:
compile: ${{ needs.changes.outputs.action }}
env:
EDK2_VERSION: ${{ matrix.edk2-version }}
GCC_TOOLCHAIN_VERSION: ${{ steps.gcc_toolchain.outputs.gcc_toolchain_version }}

- name: Get artifacts
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -297,6 +320,7 @@ jobs:
compile: ${{ needs.changes.outputs.action }}
env:
COREBOOT_VERSION: ${{ matrix.coreboot-version }}

- name: Get artifacts
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -347,6 +371,7 @@ jobs:
compile: ${{ needs.changes.outputs.action }}
env:
UROOT_VERSION: ${{ matrix.uroot-version }}

- name: Get artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion tests/example_config__edk2.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"output_dir": "output-edk2/",
"container_output_dirs": ["Build/"],
"container_output_files": null,
"build_command": "source ./edksetup.sh; build -a X64 -p UefiPayloadPkg/UefiPayloadPkg.dsc -b DEBUG -t GCC5",
"build_command": "source ./edksetup.sh; build -a X64 -p UefiPayloadPkg/UefiPayloadPkg.dsc -b DEBUG -t ${GCC_TOOLCHAIN_VERSION}",
"container_input_dir": "inputs/",
"input_dirs": null,
"input_files": null
Expand Down

0 comments on commit b15251d

Please sign in to comment.