From 72826b950595c4dc6eac1ade2bffe5fdd3e78ff0 Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Fri, 13 May 2022 07:07:18 +0000 Subject: [PATCH 1/5] Integrate Mayhem --- .github/workflows/mayhem.yml | 61 ++++++++++++++++++++++++++++++++++++ Dockerfile | 13 ++++++++ Mayhemfile | 7 +++++ 3 files changed, 81 insertions(+) create mode 100644 .github/workflows/mayhem.yml create mode 100644 Dockerfile create mode 100644 Mayhemfile diff --git a/.github/workflows/mayhem.yml b/.github/workflows/mayhem.yml new file mode 100644 index 000000000000..6a7343e06f93 --- /dev/null +++ b/.github/workflows/mayhem.yml @@ -0,0 +1,61 @@ +name: Mayhem +on: + push: + pull_request: + workflow_dispatch: + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build: + permissions: write-all + name: '${{ matrix.os }} shared=${{ matrix.shared }} ${{ matrix.build_type }}' + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + shared: [false] + build_type: [Release] + include: + - os: ubuntu-latest + triplet: x64-linux + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Start analysis + uses: ForAllSecure/mcode-action@v1 + with: + mayhem-token: ${{ secrets.MAYHEM_TOKEN }} + args: --image ${{ steps.meta.outputs.tags }} + sarif-output: sarif + + - name: Upload SARIF file(s) + uses: github/codeql-action/upload-sarif@v1 + with: + sarif_file: sarif diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000000..53abbf4f3025 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +# Build Stage +FROM --platform=linux/amd64 ubuntu:20.04 as builder + +## Install build dependencies. +RUN apt-get update +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y vim less man wget tar git gzip unzip make cmake software-properties-common curl + +ADD . /repo +WORKDIR /repo/unix +ENV LD_LIBRARY_PATH=/repo/unix +RUN ldconfig +RUN ./configure +RUN make -j8 diff --git a/Mayhemfile b/Mayhemfile new file mode 100644 index 000000000000..d1761029add4 --- /dev/null +++ b/Mayhemfile @@ -0,0 +1,7 @@ +project: rnshah9/mayhem-tcl +target: tclsh +tests: null + +cmds: + - cmd: /repo/unix/tclsh @@ + filepath: /test.tcl From 4de5fc4c61842c6157f7ac30bfc23f6e8cdf36da Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Tue, 17 May 2022 23:32:59 +0000 Subject: [PATCH 2/5] Tidy up --- .github/workflows/linux-build.yml | 54 ----------- .github/workflows/mac-build.yml | 66 -------------- .github/workflows/onefiledist.yml | 146 ------------------------------ .github/workflows/win-build.yml | 90 ------------------ Dockerfile | 6 +- 5 files changed, 2 insertions(+), 360 deletions(-) delete mode 100644 .github/workflows/linux-build.yml delete mode 100644 .github/workflows/mac-build.yml delete mode 100644 .github/workflows/onefiledist.yml delete mode 100644 .github/workflows/win-build.yml diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml deleted file mode 100644 index 8562bb514ee8..000000000000 --- a/.github/workflows/linux-build.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Linux -on: [push] -permissions: - contents: read -jobs: - gcc: - runs-on: ubuntu-20.04 - strategy: - matrix: - cfgopt: - - "" - - "CFLAGS=-DTCL_UTF_MAX=3" - - "CFLAGS=-DTCL_NO_DEPRECATED=1" - - "--disable-shared" - - "--enable-symbols" - - "--enable-symbols=mem" - - "--enable-symbols=all" - defaults: - run: - shell: bash - working-directory: unix - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Prepare - run: | - touch tclStubInit.c tclOOStubInit.c tclOOScript.h - working-directory: generic - - name: Configure ${{ matrix.cfgopt }} - run: | - mkdir "${HOME}/install dir" - ./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1) - env: - CFGOPT: ${{ matrix.cfgopt }} - - name: Build - run: | - make all - - name: Build Test Harness - run: | - make tcltest - - name: Run Tests - run: | - make test - env: - ERROR_ON_FAILURES: 1 - - name: Test-Drive Installation - run: | - make install - - name: Create Distribution Package - run: | - make dist - - name: Convert Documentation to HTML - run: | - make html-tcl diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml deleted file mode 100644 index 1ec784a5675e..000000000000 --- a/.github/workflows/mac-build.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: macOS -on: [push] -permissions: - contents: read -jobs: - xcode: - runs-on: macos-11 - defaults: - run: - shell: bash - working-directory: macosx - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Prepare - run: | - touch tclStubInit.c tclOOStubInit.c tclOOScript.h - working-directory: generic - - name: Build - run: make all - env: - CFLAGS: -arch x86_64 -arch arm64e - - name: Run Tests - run: make test styles=develop - env: - ERROR_ON_FAILURES: 1 - MAC_CI: 1 - clang: - runs-on: macos-11 - strategy: - matrix: - cfgopt: - - "" - - "--disable-shared" - - "--enable-symbols" - - "--enable-symbols=mem" - - "--enable-symbols=all" - defaults: - run: - shell: bash - working-directory: unix - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Prepare - run: | - touch tclStubInit.c tclOOStubInit.c tclOOScript.h - mkdir "$HOME/install dir" - working-directory: generic - - name: Configure ${{ matrix.cfgopt }} - # Note that macOS is always a 64 bit platform - run: ./configure --enable-dtrace --enable-framework ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1) - env: - CFLAGS: -arch x86_64 -arch arm64e - CFGOPT: ${{ matrix.cfgopt }} - - name: Build - run: | - make all tcltest - env: - CFLAGS: -arch x86_64 -arch arm64e - - name: Run Tests - run: | - make test - env: - ERROR_ON_FAILURES: 1 - MAC_CI: 1 diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml deleted file mode 100644 index c4212d40dbf1..000000000000 --- a/.github/workflows/onefiledist.yml +++ /dev/null @@ -1,146 +0,0 @@ -name: Build Binaries -on: [push] -permissions: - contents: read -jobs: - linux: - name: Linux - runs-on: ubuntu-18.04 - defaults: - run: - shell: bash - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Prepare - run: | - touch generic/tclStubInit.c generic/tclOOStubInit.c - mkdir 1dist - echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV - working-directory: . - - name: Configure - run: ./configure --disable-symbols --disable-shared --enable-zipfs - working-directory: unix - - name: Build - run: | - make tclsh - make shell SCRIPT="$VER_PATH $GITHUB_ENV" - echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV - working-directory: unix - - name: Package - run: | - cp ../unix/tclsh tclsh${TCL_PATCHLEVEL}_snapshot - chmod +x tclsh${TCL_PATCHLEVEL}_snapshot - tar -cf tclsh${TCL_PATCHLEVEL}_snapshot.tar tclsh${TCL_PATCHLEVEL}_snapshot - working-directory: 1dist - - name: Upload - uses: actions/upload-artifact@v3 - with: - name: Tclsh ${{ env.TCL_PATCHLEVEL }} Linux single-file build (snapshot) - path: 1dist/*.tar - macos: - name: macOS - runs-on: macos-11 - defaults: - run: - shell: bash - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Checkout create-dmg - uses: actions/checkout@v3 - with: - repository: create-dmg/create-dmg - ref: v1.0.8 - path: create-dmg - - name: Prepare - run: | - mkdir 1dist - touch generic/tclStubInit.c generic/tclOOStubInit.c || true - wget https://github.com/culler/macher/releases/download/v1.3/macher - sudo cp macher /usr/local/bin - sudo chmod a+x /usr/local/bin/macher - echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV - echo "CREATE_DMG=$(cd create-dmg;pwd)/create-dmg" >> $GITHUB_ENV - echo "CFLAGS=-arch x86_64 -arch arm64e" >> $GITHUB_ENV - - name: Configure - run: ./configure --disable-symbols --disable-shared --enable-zipfs - working-directory: unix - - name: Build - run: | - make tclsh - make shell SCRIPT="$VER_PATH $GITHUB_ENV" - echo "TCL_BIN=`pwd`/tclsh" >> $GITHUB_ENV - echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV - working-directory: unix - - name: Package - run: | - mkdir contents - cp $TCL_BIN contents/tclsh${TCL_PATCHLEVEL}_snapshot - chmod +x contents/tclsh${TCL_PATCHLEVEL}_snapshot - cat > contents/README.txt <> $GITHUB_ENV - mkdir 1dist - working-directory: . - - name: Configure - run: ./configure $CFGOPT - working-directory: win - - name: Build - run: | - make binaries libraries - echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV - working-directory: win - - name: Get Exact Version - run: | - ./tclsh*.exe $VER_PATH $GITHUB_ENV - working-directory: win - - name: Set Executable Name - run: | - cp ../win/tclsh*.exe tclsh${TCL_PATCHLEVEL}_snapshot.exe - working-directory: 1dist - - name: Upload - uses: actions/upload-artifact@v3 - with: - name: Tclsh ${{ env.TCL_PATCHLEVEL }} Windows single-file build (snapshot) - path: '1dist/*_snapshot.exe' diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml deleted file mode 100644 index ba4e5baa2b82..000000000000 --- a/.github/workflows/win-build.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: Windows -on: [push] -permissions: - contents: read -env: - ERROR_ON_FAILURES: 1 -jobs: - msvc: - runs-on: windows-2022 - defaults: - run: - shell: powershell - working-directory: win - strategy: - matrix: - cfgopt: - - "" - - "OPTS=utf16" - - "CHECKS=nodep" - - "OPTS=static" - - "OPTS=symbols" - - "OPTS=symbols STATS=compdbg,memdbg" - # Using powershell means we need to explicitly stop on failure - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Init MSVC - uses: ilammy/msvc-dev-cmd@v1 - - name: Build ${{ matrix.cfgopt }} - run: | - &nmake -f makefile.vc ${{ matrix.cfgopt }} all - if ($lastexitcode -ne 0) { - throw "nmake exit code: $lastexitcode" - } - - name: Build Test Harness ${{ matrix.cfgopt }} - run: | - &nmake -f makefile.vc ${{ matrix.cfgopt }} tcltest - if ($lastexitcode -ne 0) { - throw "nmake exit code: $lastexitcode" - } - - name: Run Tests ${{ matrix.cfgopt }} - run: | - &nmake -f makefile.vc ${{ matrix.cfgopt }} test - if ($lastexitcode -ne 0) { - throw "nmake exit code: $lastexitcode" - } - gcc: - runs-on: windows-2022 - defaults: - run: - shell: msys2 {0} - working-directory: win - strategy: - matrix: - cfgopt: - - "" - - "CFLAGS=-DTCL_UTF_MAX=3" - - "CFLAGS=-DTCL_NO_DEPRECATED=1" - - "--disable-shared" - - "--enable-symbols" - - "--enable-symbols=mem" - - "--enable-symbols=all" - # Using powershell means we need to explicitly stop on failure - steps: - - name: Install MSYS2 - uses: msys2/setup-msys2@v2 - with: - msystem: MINGW64 - install: git mingw-w64-x86_64-toolchain make - - name: Checkout - uses: actions/checkout@v3 - - name: Prepare - run: | - touch tclStubInit.c tclOOStubInit.c tclOOScript.h - mkdir "${HOME}/install dir" - working-directory: generic - - name: Configure ${{ matrix.cfgopt }} - run: | - ./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1) - env: - CFGOPT: --enable-64bit ${{ matrix.cfgopt }} - - name: Build - run: make all - - name: Build Test Harness - run: make tcltest - - name: Run Tests - run: make test - -# 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. diff --git a/Dockerfile b/Dockerfile index 53abbf4f3025..e7c9c56ae8b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,7 @@ -# Build Stage -FROM --platform=linux/amd64 ubuntu:20.04 as builder +FROM --platform=linux/amd64 ubuntu:20.04 -## Install build dependencies. RUN apt-get update -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y vim less man wget tar git gzip unzip make cmake software-properties-common curl +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y make gcc ADD . /repo WORKDIR /repo/unix From 9b9b80041408d5ca581b2c58ac4116d6ab4e2dbd Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Thu, 9 Jun 2022 04:40:55 +0000 Subject: [PATCH 3/5] Add package stage --- Dockerfile | 11 ++++++++++- Mayhemfile | 5 ++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index e7c9c56ae8b6..7d1b78f38dd6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/amd64 ubuntu:20.04 +FROM --platform=linux/amd64 ubuntu:20.04 as builder RUN apt-get update RUN DEBIAN_FRONTEND=noninteractive apt-get install -y make gcc @@ -9,3 +9,12 @@ ENV LD_LIBRARY_PATH=/repo/unix RUN ldconfig RUN ./configure RUN make -j8 + +RUN mkdir -p /deps +RUN ldd /repo/unix/tclsh | tr -s '[:blank:]' '\n' | grep '^/' | xargs -I % sh -c 'cp % /deps;' + +FROM ubuntu:20.04 as package + +COPY --from=builder /deps /deps +COPY --from=builder /repo/unix/tclsh /repo/unix/tclsh +ENV LD_LIBRARY_PATH=/deps diff --git a/Mayhemfile b/Mayhemfile index d1761029add4..e456c167a19b 100644 --- a/Mayhemfile +++ b/Mayhemfile @@ -1,7 +1,6 @@ -project: rnshah9/mayhem-tcl +project: tcl target: tclsh -tests: null cmds: - - cmd: /repo/unix/tclsh @@ + - cmd: /repo/unix/tclsh /test.tcl filepath: /test.tcl From 2a276d05ca6b62b8eda0890b77219ea69b49bb33 Mon Sep 17 00:00:00 2001 From: Raj Shah Date: Thu, 9 Jun 2022 04:41:05 +0000 Subject: [PATCH 4/5] Restore deleted workflows --- .github/workflows/linux-build.yml | 52 +++++++++++ .github/workflows/mac-build.yml | 64 +++++++++++++ .github/workflows/onefiledist.yml | 144 ++++++++++++++++++++++++++++++ .github/workflows/win-build.yml | 88 ++++++++++++++++++ 4 files changed, 348 insertions(+) create mode 100644 .github/workflows/linux-build.yml create mode 100644 .github/workflows/mac-build.yml create mode 100644 .github/workflows/onefiledist.yml create mode 100644 .github/workflows/win-build.yml diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml new file mode 100644 index 000000000000..c365faae532f --- /dev/null +++ b/.github/workflows/linux-build.yml @@ -0,0 +1,52 @@ +name: Linux +on: [push] +jobs: + gcc: + runs-on: ubuntu-20.04 + strategy: + matrix: + cfgopt: + - "" + - "CFLAGS=-DTCL_UTF_MAX=3" + - "CFLAGS=-DTCL_NO_DEPRECATED=1" + - "--disable-shared" + - "--enable-symbols" + - "--enable-symbols=mem" + - "--enable-symbols=all" + defaults: + run: + shell: bash + working-directory: unix + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Prepare + run: | + touch tclStubInit.c tclOOStubInit.c tclOOScript.h + working-directory: generic + - name: Configure ${{ matrix.cfgopt }} + run: | + mkdir "${HOME}/install dir" + ./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1) + env: + CFGOPT: ${{ matrix.cfgopt }} + - name: Build + run: | + make all + - name: Build Test Harness + run: | + make tcltest + - name: Run Tests + run: | + make test + env: + ERROR_ON_FAILURES: 1 + - name: Test-Drive Installation + run: | + make install + - name: Create Distribution Package + run: | + make dist + - name: Convert Documentation to HTML + run: | + make html-tcl diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml new file mode 100644 index 000000000000..30c16afaa4cf --- /dev/null +++ b/.github/workflows/mac-build.yml @@ -0,0 +1,64 @@ +name: macOS +on: [push] +jobs: + xcode: + runs-on: macos-11 + defaults: + run: + shell: bash + working-directory: macosx + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Prepare + run: | + touch tclStubInit.c tclOOStubInit.c tclOOScript.h + working-directory: generic + - name: Build + run: make all + env: + CFLAGS: -arch x86_64 -arch arm64e + - name: Run Tests + run: make test styles=develop + env: + ERROR_ON_FAILURES: 1 + MAC_CI: 1 + clang: + runs-on: macos-11 + strategy: + matrix: + cfgopt: + - "" + - "--disable-shared" + - "--enable-symbols" + - "--enable-symbols=mem" + - "--enable-symbols=all" + defaults: + run: + shell: bash + working-directory: unix + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Prepare + run: | + touch tclStubInit.c tclOOStubInit.c tclOOScript.h + mkdir "$HOME/install dir" + working-directory: generic + - name: Configure ${{ matrix.cfgopt }} + # Note that macOS is always a 64 bit platform + run: ./configure --enable-dtrace --enable-framework ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1) + env: + CFLAGS: -arch x86_64 -arch arm64e + CFGOPT: ${{ matrix.cfgopt }} + - name: Build + run: | + make all tcltest + env: + CFLAGS: -arch x86_64 -arch arm64e + - name: Run Tests + run: | + make test + env: + ERROR_ON_FAILURES: 1 + MAC_CI: 1 diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml new file mode 100644 index 000000000000..8bd8ed27f272 --- /dev/null +++ b/.github/workflows/onefiledist.yml @@ -0,0 +1,144 @@ +name: Build Binaries +on: [push] +jobs: + linux: + name: Linux + runs-on: ubuntu-18.04 + defaults: + run: + shell: bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Prepare + run: | + touch generic/tclStubInit.c generic/tclOOStubInit.c + mkdir 1dist + echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV + working-directory: . + - name: Configure + run: ./configure --disable-symbols --disable-shared --enable-zipfs + working-directory: unix + - name: Build + run: | + make tclsh + make shell SCRIPT="$VER_PATH $GITHUB_ENV" + echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV + working-directory: unix + - name: Package + run: | + cp ../unix/tclsh tclsh${TCL_PATCHLEVEL}_snapshot + chmod +x tclsh${TCL_PATCHLEVEL}_snapshot + tar -cf tclsh${TCL_PATCHLEVEL}_snapshot.tar tclsh${TCL_PATCHLEVEL}_snapshot + working-directory: 1dist + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: Tclsh ${{ env.TCL_PATCHLEVEL }} Linux single-file build (snapshot) + path: 1dist/*.tar + macos: + name: macOS + runs-on: macos-11 + defaults: + run: + shell: bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Checkout create-dmg + uses: actions/checkout@v2 + with: + repository: create-dmg/create-dmg + ref: v1.0.8 + path: create-dmg + - name: Prepare + run: | + mkdir 1dist + touch generic/tclStubInit.c generic/tclOOStubInit.c || true + wget https://github.com/culler/macher/releases/download/v1.3/macher + sudo cp macher /usr/local/bin + sudo chmod a+x /usr/local/bin/macher + echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV + echo "CREATE_DMG=$(cd create-dmg;pwd)/create-dmg" >> $GITHUB_ENV + echo "CFLAGS=-arch x86_64 -arch arm64e" >> $GITHUB_ENV + - name: Configure + run: ./configure --disable-symbols --disable-shared --enable-zipfs + working-directory: unix + - name: Build + run: | + make tclsh + make shell SCRIPT="$VER_PATH $GITHUB_ENV" + echo "TCL_BIN=`pwd`/tclsh" >> $GITHUB_ENV + echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV + working-directory: unix + - name: Package + run: | + mkdir contents + cp $TCL_BIN contents/tclsh${TCL_PATCHLEVEL}_snapshot + chmod +x contents/tclsh${TCL_PATCHLEVEL}_snapshot + cat > contents/README.txt <> $GITHUB_ENV + mkdir 1dist + working-directory: . + - name: Configure + run: ./configure $CFGOPT + working-directory: win + - name: Build + run: | + make binaries libraries + echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV + working-directory: win + - name: Get Exact Version + run: | + ./tclsh*.exe $VER_PATH $GITHUB_ENV + working-directory: win + - name: Set Executable Name + run: | + cp ../win/tclsh*.exe tclsh${TCL_PATCHLEVEL}_snapshot.exe + working-directory: 1dist + - name: Upload + uses: actions/upload-artifact@v2 + with: + name: Tclsh ${{ env.TCL_PATCHLEVEL }} Windows single-file build (snapshot) + path: '1dist/*_snapshot.exe' diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml new file mode 100644 index 000000000000..e3c991e76e39 --- /dev/null +++ b/.github/workflows/win-build.yml @@ -0,0 +1,88 @@ +name: Windows +on: [push] +env: + ERROR_ON_FAILURES: 1 +jobs: + msvc: + runs-on: windows-2022 + defaults: + run: + shell: powershell + working-directory: win + strategy: + matrix: + cfgopt: + - "" + - "OPTS=utf16" + - "CHECKS=nodep" + - "OPTS=static" + - "OPTS=symbols" + - "OPTS=symbols STATS=compdbg,memdbg" + # Using powershell means we need to explicitly stop on failure + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Init MSVC + uses: ilammy/msvc-dev-cmd@v1 + - name: Build ${{ matrix.cfgopt }} + run: | + &nmake -f makefile.vc ${{ matrix.cfgopt }} all + if ($lastexitcode -ne 0) { + throw "nmake exit code: $lastexitcode" + } + - name: Build Test Harness ${{ matrix.cfgopt }} + run: | + &nmake -f makefile.vc ${{ matrix.cfgopt }} tcltest + if ($lastexitcode -ne 0) { + throw "nmake exit code: $lastexitcode" + } + - name: Run Tests ${{ matrix.cfgopt }} + run: | + &nmake -f makefile.vc ${{ matrix.cfgopt }} test + if ($lastexitcode -ne 0) { + throw "nmake exit code: $lastexitcode" + } + gcc: + runs-on: windows-2022 + defaults: + run: + shell: msys2 {0} + working-directory: win + strategy: + matrix: + cfgopt: + - "" + - "CFLAGS=-DTCL_UTF_MAX=3" + - "CFLAGS=-DTCL_NO_DEPRECATED=1" + - "--disable-shared" + - "--enable-symbols" + - "--enable-symbols=mem" + - "--enable-symbols=all" + # Using powershell means we need to explicitly stop on failure + steps: + - name: Install MSYS2 + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + install: git mingw-w64-x86_64-toolchain make + - name: Checkout + uses: actions/checkout@v2 + - name: Prepare + run: | + touch tclStubInit.c tclOOStubInit.c tclOOScript.h + mkdir "${HOME}/install dir" + working-directory: generic + - name: Configure ${{ matrix.cfgopt }} + run: | + ./configure ${CFGOPT} "--prefix=$HOME/install dir" || (cat config.log && exit 1) + env: + CFGOPT: --enable-64bit ${{ matrix.cfgopt }} + - name: Build + run: make all + - name: Build Test Harness + run: make tcltest + - name: Run Tests + run: make test + +# 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. From cd017d99eb138d94ee2d39b8f77a09d5ce96298a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Jul 2022 02:29:39 +0000 Subject: [PATCH 5/5] Bump actions/upload-artifact from 2 to 3 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/onefiledist.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index 8bd8ed27f272..42ce34fbaaa2 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -32,7 +32,7 @@ jobs: tar -cf tclsh${TCL_PATCHLEVEL}_snapshot.tar tclsh${TCL_PATCHLEVEL}_snapshot working-directory: 1dist - name: Upload - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: Tclsh ${{ env.TCL_PATCHLEVEL }} Linux single-file build (snapshot) path: 1dist/*.tar @@ -94,7 +94,7 @@ jobs: "contents/" working-directory: 1dist - name: Upload - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: Tclsh ${{ env.TCL_PATCHLEVEL }} macOS single-file build (snapshot) path: 1dist/*.dmg @@ -138,7 +138,7 @@ jobs: cp ../win/tclsh*.exe tclsh${TCL_PATCHLEVEL}_snapshot.exe working-directory: 1dist - name: Upload - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: Tclsh ${{ env.TCL_PATCHLEVEL }} Windows single-file build (snapshot) path: '1dist/*_snapshot.exe'