From 91f1a45b722e2de3a17a64bcd5845021a7864626 Mon Sep 17 00:00:00 2001 From: Jens Keiner Date: Mon, 6 Oct 2025 20:32:42 +0200 Subject: [PATCH 1/4] FIrst shot at windows build workflow. --- .github/workflows/build_windows.yml | 142 ++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 .github/workflows/build_windows.yml diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml new file mode 100644 index 00000000..ab633f79 --- /dev/null +++ b/.github/workflows/build_windows.yml @@ -0,0 +1,142 @@ +name: Build Windows + +on: + push: + branches: [ main, develop, master ] + pull_request: + branches: [ main, develop, master ] + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + strategy: + matrix: + include: + # Windows with GCC + - compiler: gcc + window: kaiserbessel + precision: "" + build_julia: 1 + + # Windows with Clang + - compiler: clang + window: kaiserbessel + precision: "" + build_julia: 1 + + steps: + - uses: actions/checkout@v5 + # with: + # autocrlf: input + # symlinks: true + + # - name: Cache MSYS2 and Chocolatey + # uses: actions/cache@v3 + # with: + # path: | + # ~/AppData/Local/Temp/chocolatey + # C:/tools/msys64 + # key: ${{ runner.os }}-msys2-${{ hashFiles('**/packages.txt') }} + # restore-keys: | + # ${{ runner.os }}-msys2- + + # - name: Setup MSYS2 + # run: | + # if (!(Test-Path "C:/tools/msys64/msys2_shell.cmd")) { + # Remove-Item -Recurse -Force "C:/tools/msys64" -ErrorAction SilentlyContinue + # } + # choco uninstall -y mingw + # choco upgrade --no-progress -y msys2 julia + + # $msys2 = "cmd /C RefreshEnv.cmd " + # $msys2 += "& set MSYS=winsymlinks:nativestrict " + # $msys2 += "& C:\tools\msys64\msys2_shell.cmd -defterm -no-start" + + # Write-Output "msys2=$msys2" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + # # Install base packages + # & $msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-fftw mingw-w64-x86_64-cunit autoconf perl libtool automake make + + # if ("${{ matrix.compiler }}" -eq "clang") { + # & $msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-clang mingw-w64-x86_64-openmp + # Write-Output "OPENMP_CFLAGS=-fopenmp=libomp" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Write-Output "LDFLAGS=-lomp" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # } + + # # Kill gpg-agent to prevent issues + # taskkill //IM gpg-agent.exe //F + + # Write-Output "PATH=C:/tools/msys64/mingw64/bin;$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # Write-Output "MAKE=mingw32-make" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + - name: Install dependencies + run: | + msys2bash.cmd -c "pacman --sync --noconfirm --needed mingw-w64-x86_64-fftw" + + # - name: Bootstrap + # shell: cmd + # run: | + # set MSYSTEM=MINGW64 + # set PATH=C:\tools\msys64\mingw64\bin;%PATH% + # bash -lc "cd /c/Users/%USERNAME%/work/%REPOSITORY_NAME%/%REPOSITORY_NAME% && ./bootstrap.sh" + # env: + # MSYSTEM: MINGW64 + + # - name: Configure + # shell: cmd + # run: | + # set MSYSTEM=MINGW64 + # set PATH=C:\tools\msys64\mingw64\bin;%PATH% + # bash -lc "cd /c/Users/%USERNAME%/work/%REPOSITORY_NAME%/%REPOSITORY_NAME% && ./configure --with-window=${{ matrix.window }} ${{ matrix.precision }} --enable-all --enable-openmp --enable-julia" + # env: + # MSYSTEM: MINGW64 + + # - name: Build + # shell: cmd + # run: | + # set MSYSTEM=MINGW64 + # set PATH=C:\tools\msys64\mingw64\bin;%PATH% + # bash -lc "cd /c/Users/%USERNAME%/work/%REPOSITORY_NAME%/%REPOSITORY_NAME% && make" + # env: + # MSYSTEM: MINGW64 + + # - name: Test + # shell: cmd + # run: | + # set MSYSTEM=MINGW64 + # set PATH=C:\tools\msys64\mingw64\bin;%PATH% + # bash -lc "cd /c/Users/%USERNAME%/work/%REPOSITORY_NAME%/%REPOSITORY_NAME% && make check" + # env: + # MSYSTEM: MINGW64 + + # - name: Test Julia + # if: matrix.build_julia == '1' + # shell: cmd + # run: | + # set MSYSTEM=MINGW64 + # set PATH=C:\tools\msys64\mingw64\bin;%PATH% + # bash -lc "cd /c/Users/%USERNAME%/work/%REPOSITORY_NAME%/%REPOSITORY_NAME% && for DIR in julia/nf*t julia/fastsum; do cd $DIR; for NAME in simple_test*.jl; do julia \"$NAME\"; done; cd ../..; done" + # env: + # MSYSTEM: MINGW64 + + # - name: Upload logs on failure + # if: failure() + # uses: actions/upload-artifact@v3 + # with: + # name: config-logs-windows-${{ matrix.compiler }}-${{ matrix.window }}-${{ matrix.precision }} + # path: | + # config.log + # tests/test-suite.log + # matlab/tests/test-suite.log + + # - name: Cleanup MSYS2 + # if: always() + # shell: cmd + # run: | + # $msys2 = "cmd /C RefreshEnv.cmd " + # $msys2 += "& set MSYS=winsymlinks:nativestrict " + # $msys2 += "& C:\tools\msys64\msys2_shell.cmd -defterm -no-start" + # & $msys2 pacman --sync --clean --noconfirm + # Remove-Item -Force "C:\tools\msys64\update.log" -ErrorAction SilentlyContinue + # Remove-Item -Recurse -Force "C:\tools\msys64\var\log" -ErrorAction SilentlyContinue \ No newline at end of file From 36a10a0cb9ecb263000fbe4054d710b9e0f88ccb Mon Sep 17 00:00:00 2001 From: Jens Keiner Date: Mon, 6 Oct 2025 21:04:53 +0200 Subject: [PATCH 2/4] wip --- .github/workflows/build_windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index ab633f79..2f7832c0 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -71,8 +71,9 @@ jobs: # Write-Output "MAKE=mingw32-make" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Install dependencies + shell: C:\msys64\usr\bin\bash.exe run: | - msys2bash.cmd -c "pacman --sync --noconfirm --needed mingw-w64-x86_64-fftw" + pacman --sync --noconfirm --needed mingw-w64-x86_64-fftw # - name: Bootstrap # shell: cmd From 46d9a883c1ead39a79ec2343875ae6f07ec42406 Mon Sep 17 00:00:00 2001 From: Jens Keiner Date: Mon, 6 Oct 2025 21:05:09 +0200 Subject: [PATCH 3/4] disable linux and macos --- .github/workflows/build-linux.yml | 8 ++++---- .github/workflows/build-macos.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 198bff87..267c6680 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -1,10 +1,10 @@ name: Build Linux on: - push: - branches: [ main, develop, master ] - pull_request: - branches: [ main, develop, master ] + # push: + # branches: [ main, develop, master ] + # pull_request: + # branches: [ main, develop, master ] workflow_dispatch: jobs: diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 4652d418..bef02815 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -1,10 +1,10 @@ name: Build macOS on: - push: - branches: [ main, develop, master ] - pull_request: - branches: [ main, develop, master ] + # push: + # branches: [ main, develop, master ] + # pull_request: + # branches: [ main, develop, master ] workflow_dispatch: jobs: From 9edd7179fb202bcbe9d8ff1470c18437df2399fe Mon Sep 17 00:00:00 2001 From: Jens Keiner Date: Mon, 6 Oct 2025 21:08:25 +0200 Subject: [PATCH 4/4] wip --- .github/workflows/build_windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index 2f7832c0..4f20cd9f 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -71,7 +71,7 @@ jobs: # Write-Output "MAKE=mingw32-make" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - name: Install dependencies - shell: C:\msys64\usr\bin\bash.exe + shell: C:\msys64\usr\bin\bash.exe {0} run: | pacman --sync --noconfirm --needed mingw-w64-x86_64-fftw