From 785aa9bf1eed187a596b75e84931e37b2b41533a Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 12:28:26 +0100 Subject: [PATCH 01/26] gh action: test the build matrix --- .github/workflows/ccpp.yml | 51 ------------------ .github/workflows/codeql-analysis.yml | 74 --------------------------- .github/workflows/matrix-test.yml | 58 +++++++++++++++++++++ 3 files changed, 58 insertions(+), 125 deletions(-) delete mode 100644 .github/workflows/ccpp.yml delete mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 .github/workflows/matrix-test.yml diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml deleted file mode 100644 index 086fd5b5e9..0000000000 --- a/.github/workflows/ccpp.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: C/C++ CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: apt-get update - run: sudo apt-get update - - name: apt-get 3rd party repo libgd-dev dependency workaround - run: sudo apt-get remove nginx libgd3 - - name: apt-get install - run: sudo apt-get install -y autopoint gettext libusb-1.0-0-dev libcurl4-openssl-dev libgd-dev - - name: autoreconf - run: autoreconf -i -f - - name: configure - run: ./configure --prefix=$PWD/__prefix - - name: make - run: NPROC=$(nproc); set -x; make -j$NPROC -l$NPROC - - name: make check - run: NPROC=$(nproc); set -x; make -j$NPROC -l$NPROC check - - name: make distcheck - run: NPROC=$(nproc); set -x; make -j$NPROC -l$NPROC distcheck - - name: make install - run: NPROC=$(nproc); set -x; make -j$NPROC -l$NPROC install - - name: make installcheck - run: NPROC=$(nproc); set -x; make -j$NPROC -l$NPROC installcheck - - name: build and run example libgphoto2 frontend (ambs-lgp2-frontend) - run: | - set -x - exec 2>&1 - abs_top_builddir="$PWD" - export PKG_CONFIG_PATH="${abs_top_builddir}/__prefix/lib/pkgconfig" - export LD_LIBRARY_PATH="${abs_top_builddir}/__prefix/lib" - cd examples/ambs-lgp2-frontend - autoreconf -vis - ./configure --prefix="$PWD/__pref" - make - ldd ambs-lgp2-frontend - ./ambs-lgp2-frontend - make install - ldd __pref/bin/ambs-lgp2-frontend - __pref/bin/ambs-lgp2-frontend diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index b784f9eed3..0000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,74 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -name: "CodeQL" - -on: - push: - branches: [master] - pull_request: - # The branches below must be a subset of the branches above - branches: [master] - schedule: - - cron: '0 17 * * 6' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['cpp'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - with: - # We must fetch at least the immediate parents so that if this is - # a pull request then we can checkout the head. - fetch-depth: 2 - - # If this run was triggered by a pull request event, then checkout - # the head of the pull request instead of the merge commit. - - run: git checkout HEAD^2 - if: ${{ github.event_name == 'pull_request' }} - - # install all necessary things - - run: sudo apt-get update && sudo apt-get install -y autopoint gettext libusb-1.0-0-dev libcurl4-openssl-dev - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v1 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml new file mode 100644 index 0000000000..6026317985 --- /dev/null +++ b/.github/workflows/matrix-test.yml @@ -0,0 +1,58 @@ +name: "Matrix-Test" + +on: + push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] + +jobs: + build: + name: "${{ matrix.os }} ${{ matrix.sys }} build" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + include: + - os: windows-latest + - { sys: mingw32, env: i686 } + - { sys: mingw64, env: x86_64 } + + env: + if: runner.os == 'Windows' + MINGW_ARCH: ${{ matrix.sys }} + + defaults: + run: + if: runner.os == 'Windows' + shell: msys2 {0} + + steps: + - name: 'git config' + if: runner.os == 'Windows' + run: git config --global core.autocrlf input + shell: bash + + - uses: actions/checkout@v3 + + - name: 'Set up MSYS2 and Install Software' + if: runner.os == 'Windows' + uses: msys2/setup-msys2@v2 + with: + msystem: ${{ matrix.sys }} + + - name: 'Determine number of cores to build on' + if: runner.os == 'Linux' + run: echo NPROC="$(nproc)" >> $GITHUB_ENV + + - name: 'Determine number of cores to build on' + if: runner.os == 'Windows' + run: echo NPROC="${NUMBER_OF_PROCESSORS}" >> $GITHUB_ENV + + - name: 'Determine number of cores to build on' + if: runner.os == 'macOS' + run: echo NPROC="$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV + + - name: 'Check environment' + run: echo foobar From 0525a349e22e2ba75f2dd150dde425fcca3b9108 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 12:31:04 +0100 Subject: [PATCH 02/26] XXX testing --- .github/workflows/matrix-test.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 6026317985..1ccf14be32 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -14,19 +14,6 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - include: - - os: windows-latest - - { sys: mingw32, env: i686 } - - { sys: mingw64, env: x86_64 } - - env: - if: runner.os == 'Windows' - MINGW_ARCH: ${{ matrix.sys }} - - defaults: - run: - if: runner.os == 'Windows' - shell: msys2 {0} steps: - name: 'git config' From 0bd44c544a50229567ac1e0a21096a9ff882037a Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 12:33:33 +0100 Subject: [PATCH 03/26] FMU --- .github/workflows/matrix-test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 1ccf14be32..210c945f10 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -29,17 +29,17 @@ jobs: with: msystem: ${{ matrix.sys }} - - name: 'Determine number of cores to build on' + - name: 'Determine number of cores to build on (Linux)' if: runner.os == 'Linux' run: echo NPROC="$(nproc)" >> $GITHUB_ENV - - name: 'Determine number of cores to build on' + - name: 'Determine number of cores to build on (Windows)' if: runner.os == 'Windows' run: echo NPROC="${NUMBER_OF_PROCESSORS}" >> $GITHUB_ENV - - name: 'Determine number of cores to build on' + - name: 'Determine number of cores to build on (macOS)' if: runner.os == 'macOS' run: echo NPROC="$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV - - name: 'Check environment' - run: echo foobar + - name: 'Check NPROC value' + run: echo NPROC=$NPROC From 166cf2e6c7a2c42cbf75cf2636ce4b4620f52b4e Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 12:35:29 +0100 Subject: [PATCH 04/26] try extending windows matrix --- .github/workflows/matrix-test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 210c945f10..bc38d4751d 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -14,6 +14,11 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] + include: + - os: windows-latest + sys: mingw32 + - os: windows-latest + sys: mingw64 steps: - name: 'git config' From d972a0ef0799645014dc9b0792c1bd3120d87ee1 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 12:37:35 +0100 Subject: [PATCH 05/26] try extending windows matrix --- .github/workflows/matrix-test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index bc38d4751d..89c3ab48fe 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -16,9 +16,8 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] include: - os: windows-latest - sys: mingw32 - - os: windows-latest - sys: mingw64 + - { sys: mingw32 } + - { sys: mingw64 } steps: - name: 'git config' From 8d9fcefc074a65d643ebe4ce52484b51f22584b7 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 12:39:23 +0100 Subject: [PATCH 06/26] test extending windows matrix --- .github/workflows/matrix-test.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 89c3ab48fe..f41975740f 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -15,9 +15,8 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macos-latest] include: - - os: windows-latest - - { sys: mingw32 } - - { sys: mingw64 } + - { os: windows-latest, sys: mingw32 } + - { os: windows-latest, sys: mingw64 } steps: - name: 'git config' From 651ad0963d0053b0c69e79ee5f96fb621e4fe588 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 12:40:33 +0100 Subject: [PATCH 07/26] try extending build matrix for win --- .github/workflows/matrix-test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index f41975740f..a2315adb8e 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -13,8 +13,9 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] include: + - { os: ubuntu-latest } + - { os: macos-latest } - { os: windows-latest, sys: mingw32 } - { os: windows-latest, sys: mingw64 } From 65881898d1bc920c10f8415b0dfa383b0016b18b Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 12:42:12 +0100 Subject: [PATCH 08/26] conditional env? --- .github/workflows/matrix-test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index a2315adb8e..c93d322070 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -19,6 +19,10 @@ jobs: - { os: windows-latest, sys: mingw32 } - { os: windows-latest, sys: mingw64 } + env: + if: runner.os == 'Windows' + MINGW_ARCH: ${{ matrix.sys }} + steps: - name: 'git config' if: runner.os == 'Windows' From de81cd3278500876cf03eb3b814de39550d70a9a Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 12:46:16 +0100 Subject: [PATCH 09/26] try using msys2 shell for windows only --- .github/workflows/matrix-test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index c93d322070..2aca536841 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -20,9 +20,13 @@ jobs: - { os: windows-latest, sys: mingw64 } env: - if: runner.os == 'Windows' MINGW_ARCH: ${{ matrix.sys }} + defaults: + if: runner.os == 'Windows' + run: + shell: msys2 {0} + steps: - name: 'git config' if: runner.os == 'Windows' @@ -43,7 +47,7 @@ jobs: - name: 'Determine number of cores to build on (Windows)' if: runner.os == 'Windows' - run: echo NPROC="${NUMBER_OF_PROCESSORS}" >> $GITHUB_ENV + run: echo NPROC="${NUMBER_OF_PROCESSORS-unknown}" >> $GITHUB_ENV - name: 'Determine number of cores to build on (macOS)' if: runner.os == 'macOS' From 07727b3fa7d690e71dd50d71206247cb0dec4239 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 12:49:14 +0100 Subject: [PATCH 10/26] try default/shell/msys2 --- .github/workflows/matrix-test.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 2aca536841..2e05e4dc67 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -22,11 +22,6 @@ jobs: env: MINGW_ARCH: ${{ matrix.sys }} - defaults: - if: runner.os == 'Windows' - run: - shell: msys2 {0} - steps: - name: 'git config' if: runner.os == 'Windows' @@ -47,7 +42,7 @@ jobs: - name: 'Determine number of cores to build on (Windows)' if: runner.os == 'Windows' - run: echo NPROC="${NUMBER_OF_PROCESSORS-unknown}" >> $GITHUB_ENV + run: echo NPROC=%NUMBER_OF_PROCESSORS% >> $GITHUB_ENV - name: 'Determine number of cores to build on (macOS)' if: runner.os == 'macOS' From 1c29dc6f2ae3d79398c87041b8e2b356cfc076e8 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 12:53:06 +0100 Subject: [PATCH 11/26] set MINGW_ARCH conditionally --- .github/workflows/matrix-test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 2e05e4dc67..32b1f1fa49 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -19,9 +19,6 @@ jobs: - { os: windows-latest, sys: mingw32 } - { os: windows-latest, sys: mingw64 } - env: - MINGW_ARCH: ${{ matrix.sys }} - steps: - name: 'git config' if: runner.os == 'Windows' @@ -30,6 +27,11 @@ jobs: - uses: actions/checkout@v3 + - name: 'Set MINGW_ARCH (Windows)' + if: runner.os == 'Windows' + env: + MINGW_ARCH: ${{ matrix.sys }} + - name: 'Set up MSYS2 and Install Software' if: runner.os == 'Windows' uses: msys2/setup-msys2@v2 From 51f0f96c894d0249dfecd6089761919f083cd553 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 12:59:24 +0100 Subject: [PATCH 12/26] try defining MINGW_ARCH on windows only --- .github/workflows/matrix-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 32b1f1fa49..882d7cd44b 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -29,8 +29,8 @@ jobs: - name: 'Set MINGW_ARCH (Windows)' if: runner.os == 'Windows' - env: - MINGW_ARCH: ${{ matrix.sys }} + shell: bash + run: echo MINGW_ARCH="${{ matrix.sys }}" >> $GITHUB_ENV - name: 'Set up MSYS2 and Install Software' if: runner.os == 'Windows' From a61a33e06e8fabf761e66cd2dbd554dd9594eef0 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 13:12:02 +0100 Subject: [PATCH 13/26] try defining shell --- .github/workflows/matrix-test.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 882d7cd44b..25e910e9a8 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -14,16 +14,20 @@ jobs: fail-fast: false matrix: include: - - { os: ubuntu-latest } - - { os: macos-latest } - - { os: windows-latest, sys: mingw32 } - - { os: windows-latest, sys: mingw64 } + - { os: ubuntu-latest, shell: bash } + - { os: macos-latest, shell: bash } + - { os: windows-latest, shell: msys2, sys: mingw32 } + - { os: windows-latest, shell: msys2, sys: mingw64 } + + defaults: + run: + shell: '${{ matrix.shell }} {0}' steps: - name: 'git config' if: runner.os == 'Windows' run: git config --global core.autocrlf input - shell: bash + shell: ${{ matrix.shell }} - uses: actions/checkout@v3 From 12e7a39ac04379089b89c1f6e16627383136d7fc Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 13:14:15 +0100 Subject: [PATCH 14/26] more shell stuff --- .github/workflows/matrix-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 25e910e9a8..b9225bbf01 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -16,12 +16,12 @@ jobs: include: - { os: ubuntu-latest, shell: bash } - { os: macos-latest, shell: bash } - - { os: windows-latest, shell: msys2, sys: mingw32 } - - { os: windows-latest, shell: msys2, sys: mingw64 } + - { os: windows-latest, shell: 'msys2 {0}', sys: mingw32 } + - { os: windows-latest, shell: 'msys2 {0}', sys: mingw64 } defaults: run: - shell: '${{ matrix.shell }} {0}' + shell: ${{ matrix.shell }} steps: - name: 'git config' From 2ee843eac5251d50e4aec6caa9ea2550a6212057 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 13:19:29 +0100 Subject: [PATCH 15/26] shell stuff --- .github/workflows/matrix-test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index b9225bbf01..8eebc7ffbc 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -2,9 +2,9 @@ name: "Matrix-Test" on: push: - branches: [ master, main ] + branches: [master, main] pull_request: - branches: [ master, main ] + branches: [master, main] jobs: build: @@ -14,10 +14,10 @@ jobs: fail-fast: false matrix: include: - - { os: ubuntu-latest, shell: bash } - - { os: macos-latest, shell: bash } - - { os: windows-latest, shell: 'msys2 {0}', sys: mingw32 } - - { os: windows-latest, shell: 'msys2 {0}', sys: mingw64 } + - {os: ubuntu-latest, shell: bash} + - {os: macos-latest, shell: bash} + - {os: windows-latest, shell: 'msys2 {0}', sys: mingw32} + - {os: windows-latest, shell: 'msys2 {0}', sys: mingw64} defaults: run: @@ -27,7 +27,7 @@ jobs: - name: 'git config' if: runner.os == 'Windows' run: git config --global core.autocrlf input - shell: ${{ matrix.shell }} + shell: bash - uses: actions/checkout@v3 From b4b02ca9a4bbf3a88362cd40e66e26641b7065a5 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 13:22:35 +0100 Subject: [PATCH 16/26] check shell env --- .github/workflows/matrix-test.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 8eebc7ffbc..9553cf4820 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -24,7 +24,7 @@ jobs: shell: ${{ matrix.shell }} steps: - - name: 'git config' + - name: 'git config core.autocrlf (Windows)' if: runner.os == 'Windows' run: git config --global core.autocrlf input shell: bash @@ -54,5 +54,9 @@ jobs: if: runner.os == 'macOS' run: echo NPROC="$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV - - name: 'Check NPROC value' - run: echo NPROC=$NPROC + - name: 'Check shell environment' + run: | + echo "NPROC=$NPROC" + echo "SHELL=$SHELL" + echo "BASH_VERSION=$BASH_VERSION" + $SHELL --version From 6d54a13c54ebe3417100efa186deed5dbb366798 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Fri, 11 Nov 2022 13:25:32 +0100 Subject: [PATCH 17/26] shell/env fixes --- .github/workflows/matrix-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 9553cf4820..08ac4dc526 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -48,7 +48,7 @@ jobs: - name: 'Determine number of cores to build on (Windows)' if: runner.os == 'Windows' - run: echo NPROC=%NUMBER_OF_PROCESSORS% >> $GITHUB_ENV + run: echo NPROC="${NUMBER_OF_PROCESSORS-unknown}" >> $GITHUB_ENV - name: 'Determine number of cores to build on (macOS)' if: runner.os == 'macOS' From bb756370c8ecc294097e78fd078ce09f1a4cc86a Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sun, 13 Nov 2022 13:30:06 +0100 Subject: [PATCH 18/26] try two-stage windows builds --- .github/workflows/matrix-test.yml | 53 ++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 08ac4dc526..c9bb2b5489 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -7,53 +7,68 @@ on: branches: [master, main] jobs: - build: - name: "${{ matrix.os }} ${{ matrix.sys }} build" + ix-build: + name: "${{ matrix.os }} build" runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest] + + steps: + - uses: actions/checkout@v3 + + - name: 'Determine number of cores to build on (Linux)' + if: runner.os == 'Linux' + run: echo NPROC="$(nproc)" >> $GITHUB_ENV + + - name: 'Determine number of cores to build on (macOS)' + if: runner.os == 'macOS' + run: echo NPROC="$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV + + - name: 'Check shell environment' + run: | + echo "NPROC=$NPROC" + echo "SHELL=$SHELL" + echo "BASH_VERSION=$BASH_VERSION" + $SHELL --version + + msys2-build: + name: 'MSYS2 ${{ matrix.sys }} build' + runs-on: windows-latest + strategy: fail-fast: false matrix: include: - - {os: ubuntu-latest, shell: bash} - - {os: macos-latest, shell: bash} - - {os: windows-latest, shell: 'msys2 {0}', sys: mingw32} - - {os: windows-latest, shell: 'msys2 {0}', sys: mingw64} + - {sys: mingw32, env: i686} + - {sys: mingw64, env: x86_64} + - {sys: ucrt64, env: ucrt-x86_64} + - {sys: clang64, env: clang-x86_64} defaults: run: - shell: ${{ matrix.shell }} + shell: 'msys2 {0}' steps: - name: 'git config core.autocrlf (Windows)' - if: runner.os == 'Windows' run: git config --global core.autocrlf input shell: bash - uses: actions/checkout@v3 - name: 'Set MINGW_ARCH (Windows)' - if: runner.os == 'Windows' shell: bash run: echo MINGW_ARCH="${{ matrix.sys }}" >> $GITHUB_ENV - name: 'Set up MSYS2 and Install Software' - if: runner.os == 'Windows' uses: msys2/setup-msys2@v2 with: msystem: ${{ matrix.sys }} - - name: 'Determine number of cores to build on (Linux)' - if: runner.os == 'Linux' - run: echo NPROC="$(nproc)" >> $GITHUB_ENV - - name: 'Determine number of cores to build on (Windows)' - if: runner.os == 'Windows' run: echo NPROC="${NUMBER_OF_PROCESSORS-unknown}" >> $GITHUB_ENV - - name: 'Determine number of cores to build on (macOS)' - if: runner.os == 'macOS' - run: echo NPROC="$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV - - name: 'Check shell environment' run: | echo "NPROC=$NPROC" From b6f6910571569e86f0093cee7e83eb97208368ca Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sun, 13 Nov 2022 13:30:49 +0100 Subject: [PATCH 19/26] msys2-build: needs ix-build --- .github/workflows/matrix-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index c9bb2b5489..bddd49e1aa 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -34,6 +34,8 @@ jobs: $SHELL --version msys2-build: + needs: ix-build + name: 'MSYS2 ${{ matrix.sys }} build' runs-on: windows-latest From c8b77eb129d9e3daa9f3d83acad546cebe3a6d5d Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sun, 13 Nov 2022 13:33:15 +0100 Subject: [PATCH 20/26] windows-latest in matrix.os --- .github/workflows/matrix-test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index bddd49e1aa..74b951e79f 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -36,12 +36,13 @@ jobs: msys2-build: needs: ix-build - name: 'MSYS2 ${{ matrix.sys }} build' - runs-on: windows-latest + name: '${{ matrix.os }} ${{ matrix.sys }} build' + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: + os: [windows-latest] include: - {sys: mingw32, env: i686} - {sys: mingw64, env: x86_64} From 28ab880d2a8c4564aa70b19afaf874de4427beb8 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sun, 13 Nov 2022 13:38:08 +0100 Subject: [PATCH 21/26] more windows matrix include tests --- .github/workflows/matrix-test.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 74b951e79f..447ec50c3c 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -44,10 +44,14 @@ jobs: matrix: os: [windows-latest] include: - - {sys: mingw32, env: i686} - - {sys: mingw64, env: x86_64} - - {sys: ucrt64, env: ucrt-x86_64} - - {sys: clang64, env: clang-x86_64} + - sys: mingw32 + env: i686 + - sys: mingw64 + env: x86_64 + - sys: ucrt64 + env: ucrt-x86_64 + - sys: clang64 + env: clang-x86_64 defaults: run: From fb94a8772a69f44221a8b25613a6c0d1394cbc4a Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sun, 13 Nov 2022 13:50:18 +0100 Subject: [PATCH 22/26] accelerate ix-build by skipping macos --- .github/workflows/matrix-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 447ec50c3c..80fb3e7b13 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -8,12 +8,12 @@ on: jobs: ix-build: - name: "${{ matrix.os }} build" + name: "${{ matrix.os }} ix-build" runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest] # , macos-latest] steps: - uses: actions/checkout@v3 @@ -36,7 +36,7 @@ jobs: msys2-build: needs: ix-build - name: '${{ matrix.os }} ${{ matrix.sys }} build' + name: '${{ matrix.os }} ${{ matrix.sys }} msys2-build' runs-on: ${{ matrix.os }} strategy: From c76f65346bd50649c3fa88a58cc654460911aeac Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sun, 13 Nov 2022 13:52:21 +0100 Subject: [PATCH 23/26] more windows matrix tests --- .github/workflows/matrix-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 80fb3e7b13..cbe590b5c5 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -44,6 +44,7 @@ jobs: matrix: os: [windows-latest] include: + sys: [mingw32, mingw64, ucrt64, clang64] - sys: mingw32 env: i686 - sys: mingw64 From 5b9c76cd0e3b62bcc0511d48ae60291f45895692 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sun, 13 Nov 2022 13:55:09 +0100 Subject: [PATCH 24/26] more testing --- .github/workflows/matrix-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index cbe590b5c5..7e5b3376c3 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -43,8 +43,8 @@ jobs: fail-fast: false matrix: os: [windows-latest] + sys: [mingw32, mingw64, ucrt64, clang64] include: - sys: [mingw32, mingw64, ucrt64, clang64] - sys: mingw32 env: i686 - sys: mingw64 From 908c5a214ee964bd038b61509da5e3cb4f48ff70 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sun, 13 Nov 2022 13:56:03 +0100 Subject: [PATCH 25/26] more test --- .github/workflows/matrix-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 7e5b3376c3..2299dc3714 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -43,7 +43,7 @@ jobs: fail-fast: false matrix: os: [windows-latest] - sys: [mingw32, mingw64, ucrt64, clang64] + sys: [mingw32, mingw64, ucrt64] include: - sys: mingw32 env: i686 From 85fb18c6591f3c62c60cc0c8441aa1010a1c3c97 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Sun, 13 Nov 2022 13:56:50 +0100 Subject: [PATCH 26/26] ok, works for now --- .github/workflows/matrix-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/matrix-test.yml b/.github/workflows/matrix-test.yml index 2299dc3714..7e5b3376c3 100644 --- a/.github/workflows/matrix-test.yml +++ b/.github/workflows/matrix-test.yml @@ -43,7 +43,7 @@ jobs: fail-fast: false matrix: os: [windows-latest] - sys: [mingw32, mingw64, ucrt64] + sys: [mingw32, mingw64, ucrt64, clang64] include: - sys: mingw32 env: i686