Skip to content

[ci] Upgrade to GCC14 #664

[ci] Upgrade to GCC14

[ci] Upgrade to GCC14 #664

Workflow file for this run

name: Run tests on Windows
on: [pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
windows_testing:
runs-on: windows-2022
env:
PYTHONIOENCODING: "utf-8"
steps:
# Disabling snake-oil for performance reasons
- name: Disable Windows Defender
run: Set-MpPreference -DisableRealtimeMonitoring $true
# This doesn't work due to files getting overwritten from inside the zip
# [System.IO.Compression.ZipFile]::ExtractToDirectory("gcc-arm-none-eabi-win64.zip", "C:\")
# And this manual expansion code
# function Unzip($zipfile, $outdir)
# {
# Add-Type -AssemblyName System.IO.Compression.FileSystem
# $archive = [System.IO.Compression.ZipFile]::OpenRead($zipfile)
# foreach ($entry in $archive.Entries)
# {
# $entryTargetFilePath = [System.IO.Path]::Combine($outdir, $entry.FullName)
# $entryDir = [System.IO.Path]::GetDirectoryName($entryTargetFilePath)
# if(!(Test-Path $entryDir )){
# New-Item -ItemType Directory -Path $entryDir | Out-Null
# }
# if (!$entryTargetFilePath.EndsWith("\") -And !$entryTargetFilePath.EndsWith("/")) {
# [System.IO.Compression.ZipFileExtensions]::ExtractToFile($entry, $entryTargetFilePath, $true);
# }
# }
# }
# Unzip -zipfile "gcc-arm-none-eabi-win64.zip" -outdir "C:\"
# is not faster than
# Expand-Archive -Path gcc-arm-none-eabi-win64.zip -DestinationPath C:\ -Force
# GCC 12 comes with the Windows image now
# Start-Job {
# Set-Location $using:PWD
# Add-Type -Assembly "System.IO.Compression.Filesystem"
# Invoke-WebRequest -OutFile gcc-win64.zip https://github.com/brechtsanders/winlibs_mingw/releases/download/14.2.0posix-19.1.7-12.0.0-msvcrt-r3/winlibs-x86_64-posix-seh-gcc-14.2.0-mingw-w64msvcrt-12.0.0-r3.zip
# [System.IO.Compression.ZipFile]::ExtractToDirectory("gcc-win64.zip", "C:\")
# }
- name: Download and Unzip GCCs
shell: powershell
run: |
$ProgressPreference = 'SilentlyContinue'
Start-Job {
Set-Location $using:PWD
Invoke-WebRequest -OutFile gcc-arm-none-eabi-win64-13.zip https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi.zip
New-Item -Path "C:\" -Name "arm-none-eabi-13" -ItemType "Directory"
Expand-Archive -Path gcc-arm-none-eabi-win64-13.zip -DestinationPath C:\arm-none-eabi-13 -Force
Remove-Item gcc-arm-none-eabi-win64-13.zip
}
Start-Job {
Set-Location $using:PWD
Invoke-WebRequest -OutFile gcc-arm-none-eabi-win64-14.zip https://developer.arm.com/-/media/Files/downloads/gnu/14.2.rel1/binrel/arm-gnu-toolchain-14.2.rel1-mingw-w64-x86_64-arm-none-eabi.zip
New-Item -Path "C:\" -Name "arm-none-eabi-14" -ItemType "Directory"
Expand-Archive -Path gcc-arm-none-eabi-win64-14.zip -DestinationPath C:\arm-none-eabi-14 -Force
Remove-Item gcc-arm-none-eabi-win64-14.zip
}
Start-Job {
Set-Location $using:PWD
Add-Type -Assembly "System.IO.Compression.Filesystem"
Invoke-WebRequest -OutFile gcc-avr-win64.zip https://github.com/ZakKemble/avr-gcc-build/releases/download/v14.1.0-1/avr-gcc-14.1.0-x64-windows.zip
[System.IO.Compression.ZipFile]::ExtractToDirectory("gcc-avr-win64.zip", "C:\")
Remove-Item gcc-avr-win64.zip
}
Get-Job | Wait-Job
# No need for this anymore
# dir C:\mingw64
# dir C:\mingw64\bin
# echo "C:\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install GCCs
if: always()
shell: powershell
run: |
dir C:\
dir C:\arm-none-eabi-13\
dir C:\arm-none-eabi-13\arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi
dir C:\arm-none-eabi-13\arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi\bin
dir C:\arm-none-eabi-14\
dir C:\arm-none-eabi-14\arm-gnu-toolchain-14.2.rel1-mingw-w64-x86_64-arm-none-eabi
dir C:\arm-none-eabi-14\arm-gnu-toolchain-14.2.rel1-mingw-w64-x86_64-arm-none-eabi\bin
dir C:\avr-gcc-14.1.0-x64-windows
dir C:\avr-gcc-14.1.0-x64-windows\bin
echo "C:\arm-none-eabi-13\arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "C:\arm-none-eabi-14\arm-gnu-toolchain-14.2.rel1-mingw-w64-x86_64-arm-none-eabi\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "C:\avr-gcc-14.1.0-x64-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Show Version Information
if: always()
run: |
gcc --version
g++ --version
make --version
arm-none-eabi-g++ --version
avr-g++ --version