@@ -336,9 +336,34 @@ jobs:
336336 strategy :
337337 fail-fast : false
338338 matrix :
339- build_compiler : [gcc]
340- build_configuration : [Release, Debug]
341- build_platform : [x86_64, i686]
339+ include :
340+ - msys : MINGW32
341+ env : i686
342+ arch : i686
343+ configuration : Release
344+ compiler : gcc
345+ - msys : MINGW32
346+ env : i686
347+ arch : i686
348+ configuration : Debug
349+ compiler : gcc
350+ - msys : MINGW64
351+ env : x86_64
352+ arch : x86_64
353+ configuration : Release
354+ compiler : gcc
355+ - msys : MINGW64
356+ env : x86_64
357+ arch : x86_64
358+ configuration : Debug
359+ compiler : gcc
360+ - msys : CLANG64
361+ env : clang-x86_64
362+ arch : x86_64
363+ configuration : Release
364+ compiler : clang
365+
366+ name : ${{ matrix.msys }} - ${{ matrix.configuration }}
342367
343368 steps :
344369 - name : Checkout repo
@@ -352,38 +377,31 @@ jobs:
352377 $newContent = $content -replace 'TEXT\(\"Notepad\+\+ v.*\"\)', 'TEXT("Notepad++ GH_BUILD")'
353378 $newContent | Set-Content -Path 'resource.h'
354379
355- - name : Make n++ exe / gcc
356- if : matrix.build_compiler == 'gcc'
380+ - name : Install and update MSYS2 tools
381+ uses : msys2/setup-msys2@v2
382+ with :
383+ msystem : ${{ matrix.msys }}
384+ install : mingw-w64-${{ matrix.env }}-${{ matrix.compiler }} mingw-w64-${{ matrix.env }}-make
385+ update : true
386+ release : false
387+
388+ - name : Make n++ exe
357389 working-directory : .\
358390 run : |
359- Write-host "${{ matrix.build_platform }}"
360- Write-host "${{ matrix.build_configuration }}"
391+ Write-host "${{ matrix.msys }}"
392+ Write-host "${{ matrix.configuration }}"
393+ $Env:MSYSTEM = '${{ matrix.msys }}'
361394 $Env:Path = 'C:\msys64\usr\bin' + [IO.Path]::PathSeparator + $Env:Path
362- if ( $${{ matrix.build_platform == 'i686'}} ) {$Env:MSYSTEM = 'MINGW32'}
363- if ( $${{ matrix.build_platform == 'i686'}} ) {$Env:Path = 'C:\msys64\mingw32\bin' + [IO.Path]::PathSeparator + $Env:Path}
364- if ( $${{ matrix.build_platform == 'x86_64'}} ) {$Env:MSYSTEM = 'MINGW64'}
365- if ( $${{ matrix.build_platform == 'x86_64'}} ) {$Env:Path = 'C:\msys64\mingw64\bin' + [IO.Path]::PathSeparator + $Env:Path}
366- if ( $${{ matrix.build_configuration == 'Debug'}} ) {$Env:DEBUG = '1'}
367- bash -lc "pacman --noconfirm -Syuu"
368- bash -lc "pacman --noconfirm -Syuu"
369- if ( $${{ matrix.build_platform == 'i686'}} ) {bash -lc "pacman --noconfirm -S mingw-w64-i686-gcc mingw-w64-i686-make"}
370- if ( $${{ matrix.build_platform == 'x86_64'}} ) {bash -lc "pacman --noconfirm -S mingw-w64-x86_64-gcc mingw-w64-x86_64-make"}
395+ $Env:Path = 'C:\msys64\' + '${{ matrix.msys }}'.ToLower() + '\bin' + [IO.Path]::PathSeparator + $Env:Path
396+ if ( $${{ matrix.configuration == 'Debug'}} ) {$Env:DEBUG = '1'}
371397 Write-Output "Tools version:"
372- Write-Output (((gcc --version) | select-object -first 1) + " " + (gcc -dumpmachine))
398+ Write-Output (((${{ matrix.compiler }} --version) | select-object -first 1) + " " + (${{ matrix.compiler }} -dumpmachine))
373399 Write-Output (mingw32-make --version) | select-object -first 1
374400 Write-Output (sh --version) | select-object -first 1
375401 mingw32-make -f PowerEditor\gcc\makefile
376402
377- - name : Archive artifacts for ${{ matrix.build_platform}} / Release
378- if : matrix.build_configuration == 'Release'
379- uses : actions/upload-artifact@v6
380- with :
381- name : Notepad++.${{ matrix.build_compiler}}.${{ matrix.build_platform}}.${{ matrix.build_configuration}}
382- path : bin.${{ matrix.build_compiler}}.${{ matrix.build_platform}}\notepad++.exe
383-
384- - name : Archive artifacts for ${{ matrix.build_platform}} / Debug
385- if : matrix.build_configuration == 'Debug'
403+ - name : Archive artifacts for ${{ matrix.msys }} / ${{ matrix.configuration }}
386404 uses : actions/upload-artifact@v6
387405 with :
388- name : Notepad++.${{ matrix.build_compiler }}.${{ matrix.build_platform }}.${{ matrix.build_configuration }}
389- path : bin.${{ matrix.build_compiler }}.${{ matrix.build_platform}} -debug\notepad++.exe
406+ name : Notepad++.${{ matrix.compiler }}.${{ matrix.arch }}.${{ matrix.configuration }}
407+ path : bin.${{ matrix.compiler }}.${{ matrix.arch }}${{ matrix.configuration == 'Debug' && ' -debug' || '' }} \notepad++.exe
0 commit comments