diff options
| -rw-r--r-- | .github/workflows/info.tcl | 7 | ||||
| -rw-r--r-- | .github/workflows/linux-build.yml | 52 | ||||
| -rw-r--r-- | .github/workflows/mac-build.yml | 42 | ||||
| -rw-r--r-- | .github/workflows/onefiledist.yml | 6 | ||||
| -rw-r--r-- | .github/workflows/win-build.yml | 78 |
5 files changed, 136 insertions, 49 deletions
diff --git a/.github/workflows/info.tcl b/.github/workflows/info.tcl new file mode 100644 index 0000000..ad57d7d --- /dev/null +++ b/.github/workflows/info.tcl @@ -0,0 +1,7 @@ +puts exe:\t[info nameofexecutable] +puts ver:\t[info patchlevel] +catch { + puts build:\t[tcl::build-info] +} +puts lib:\t[info library] +puts plat:\t[lsort -dictionary -stride 2 [array get tcl_platform]] diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 74055fb..9f79814 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -5,25 +5,47 @@ on: - "main" - "core-9-0-branch" tags: - - "core-**" + - "core-*" permissions: contents: read jobs: + plan: + runs-on: ubuntu-latest + outputs: + gcc: ${{ steps.matrix.outputs.gcc }} + steps: + - name: Select build matrix based on branch name + id: matrix + run: | + ( + echo gcc=$(jq -nc '{config: (if env.IsMatched == "true" then env.FULL else env.PARTIAL end) | fromjson }' ) + ) | tee -a $GITHUB_OUTPUT + env: + IsMatched: ${{ github.ref_name == 'main' || github.ref_name == 'core-9-0-branch' }} + # DO NOT CHANGE THESE MATRIX SPECS; IT AFFECTS OUR COST CONTROLS + FULL: > + [ + "", + "CFLAGS=-DTCL_NO_DEPRECATED=1", + "--disable-shared", + "--disable-zipfs", + "--enable-symbols", + "--enable-symbols=mem", + "--enable-symbols=all", + "CFLAGS=-ftrapv", + "CFLAGS=-m32 CPPFLAGS=-m32 LDFLAGS=-m32 --disable-64bit" + ] + PARTIAL: > + [ + "", + "--enable-symbols=all", + "CFLAGS=-m32 CPPFLAGS=-m32 LDFLAGS=-m32 --disable-64bit" + ] gcc: + needs: plan runs-on: ubuntu-24.04 strategy: - matrix: - config: - - "" - - "CFLAGS=-DTCL_NO_DEPRECATED=1" - - "--disable-shared" - - "--disable-zipfs" - - "--enable-symbols" - - "--enable-symbols=mem" - - "--enable-symbols=all" - - "CFLAGS=-ftrapv" - # Duplicated below - - "CFLAGS=-m32 CPPFLAGS=-m32 LDFLAGS=-m32 --disable-64bit" + matrix: ${{ fromJson(needs.plan.outputs.gcc) }} defaults: run: shell: bash @@ -60,7 +82,7 @@ jobs: - name: Info run: | ulimit -a || echo 'get limit failed' - echo 'puts exe:\t[info nameofexecutable]\nver:\t[info patchlevel]\t[if {![catch tcl::build-info ret]} {set ret}]\nlib:\t[info library]\nplat:\t[lsort -dictionary -stride 2 [array get tcl_platform]]' | make runtest || echo 'get info failed' + make runtest SCRIPT=../.github/workflows/info.tcl || echo 'get info failed' - name: Run Tests run: | make test @@ -72,10 +94,12 @@ jobs: make install timeout-minutes: 5 - name: Create Distribution Package + if: ${{ matrix.config == '' }} run: | make dist timeout-minutes: 5 - name: Convert Documentation to HTML + if: ${{ matrix.config == '' }} run: | make html-tcl timeout-minutes: 5 diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index df907d9..00adcbf 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -5,10 +5,38 @@ on: - "main" - "core-9-0-branch" tags: - - "core-**" + - "core-*" permissions: contents: read jobs: + plan: + runs-on: ubuntu-latest + outputs: + clang: ${{ steps.matrix.outputs.clang }} + steps: + - name: Select build matrix based on branch name + id: matrix + run: | + ( + echo clang=$(jq -nc '{config: (if env.IsMatched == "true" then env.FULL else env.PARTIAL end) | fromjson }' ) + ) | tee -a $GITHUB_OUTPUT + env: + IsMatched: ${{ github.ref_name == 'main' || github.ref_name == 'core-9-0-branch' }} + # DO NOT CHANGE THIS MATRIX SPEC; IT AFFECTS OUR COST CONTROLS + FULL: > + [ + "", + "--disable-shared", + "--disable-zipfs", + "--enable-symbols", + "--enable-symbols=mem", + "--enable-symbols=all" + ] + PARTIAL: > + [ + "", + "--enable-symbols=all" + ] xcode: runs-on: macos-15 defaults: @@ -36,15 +64,9 @@ jobs: timeout-minutes: 15 clang: runs-on: macos-15 + needs: plan strategy: - matrix: - config: - - "" - - "--disable-shared" - - "--disable-zipfs" - - "--enable-symbols" - - "--enable-symbols=mem" - - "--enable-symbols=all" + matrix: ${{ fromJson(needs.plan.outputs.clang) }} defaults: run: shell: bash @@ -74,7 +96,7 @@ jobs: - name: Info run: | ulimit -a || echo 'get limit failed' - echo 'puts exe:\t[info nameofexecutable]\nver:\t[info patchlevel]\t[if {![catch tcl::build-info ret]} {set ret}]\nlib:\t[info library]\nplat:\t[lsort -dictionary -stride 2 [array get tcl_platform]]' | make runtest || echo 'get info failed' + make runtest SCRIPT=../.github/workflows/info.tcl || echo 'get info failed' - name: Run Tests run: | make test diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index e046cb4..66abb05 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -5,13 +5,13 @@ on: - "main" - "core-9-0-branch" tags: - - "core-**" + - "core-*" permissions: contents: read jobs: linux: name: Linux - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 defaults: run: shell: bash @@ -124,7 +124,7 @@ jobs: url: ${{ steps.upload.outputs.artifact-url }} win: name: Windows - runs-on: windows-2019 + runs-on: windows-2025 defaults: run: shell: msys2 {0} diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 112b656..f2fe777 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -5,27 +5,65 @@ on: - "main" - "core-9-0-branch" tags: - - "core-**" + - "core-*" permissions: contents: read -env: - ERROR_ON_FAILURES: 1 jobs: + plan: + runs-on: ubuntu-latest + outputs: + msvc: ${{ steps.matrix.outputs.msvc }} + gcc: ${{ steps.matrix.outputs.gcc }} + steps: + - name: Select build matrix based on branch name + id: matrix + run: | + ( + echo msvc=$(jq -nc '{config: (if env.IsMatched == "true" then env.MSVC_FULL else env.MSVC_PARTIAL end) | fromjson }' ) + echo gcc=$(jq -nc '{config: (if env.IsMatched == "true" then env.GCC_FULL else env.GCC_PARTIAL end) | fromjson }' ) + ) | tee -a $GITHUB_OUTPUT + env: + IsMatched: ${{ github.ref_name == 'main' || github.ref_name == 'core-9-0-branch' }} + # DO NOT CHANGE THESE MATRIX SPECS; IT AFFECTS OUR COST CONTROLS + MSVC_FULL: > + [ + "", + "CHECKS=nodep", + "OPTS=static", + "OPTS=noembed", + "OPTS=symbols", + "OPTS=symbols STATS=compdbg,memdbg" + ] + MSVC_PARTIAL: > + [ + "", + "OPTS=symbols STATS=compdbg,memdbg" + ] + GCC_FULL: > + [ + "", + "CFLAGS=-DTCL_NO_DEPRECATED=1", + "--disable-shared", + "--disable-zipfs", + "--enable-symbols", + "--enable-symbols=mem", + "--enable-symbols=all" + ] + GCC_PARTIAL: > + [ + "", + "--disable-shared", + "--enable-symbols=all" + ] msvc: runs-on: windows-2025 + needs: plan defaults: run: shell: powershell working-directory: win strategy: - matrix: - config: - - "" - - "CHECKS=nodep" - - "OPTS=static" - - "OPTS=noembed" - - "OPTS=symbols" - - "OPTS=symbols STATS=compdbg,memdbg" + matrix: ${{ fromJson(needs.plan.outputs.msvc) }} # Using powershell means we need to explicitly stop on failure steps: - name: Checkout @@ -55,23 +93,17 @@ jobs: throw "nmake exit code: $lastexitcode" } timeout-minutes: 30 + env: + ERROR_ON_FAILURES: 1 gcc: runs-on: windows-2025 + needs: plan defaults: run: shell: msys2 {0} working-directory: win strategy: - matrix: - config: - - "" - - "CFLAGS=-DTCL_NO_DEPRECATED=1" - - "--disable-shared" - - "--disable-zipfs" - - "--enable-symbols" - - "--enable-symbols=mem" - - "--enable-symbols=all" - # Using powershell means we need to explicitly stop on failure + matrix: ${{ fromJson(needs.plan.outputs.gcc) }} steps: - name: Install MSYS2 uses: msys2/setup-msys2@v2 @@ -102,10 +134,12 @@ jobs: - name: Info run: | ulimit -a || echo 'get limit failed' - echo 'puts exe:\t[info nameofexecutable]\nver:\t[info patchlevel]\t[if {![catch tcl::build-info ret]} {set ret}]\nlib:\t[info library]\nplat:\t[lsort -dictionary -stride 2 [array get tcl_platform]]' | make runtest || echo 'get info failed' + make runtest SCRIPT=../.github/workflows/info.tcl || echo 'get info failed' - name: Run Tests run: make test timeout-minutes: 30 + env: + ERROR_ON_FAILURES: 1 # If you add builds with Wine, be sure to define the environment variable # CI_USING_WINE when running them so that broken tests know not to run. |
