diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index dd8ec2434..38baa8972 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -13,7 +13,7 @@ env: NO_FORCE: 1 GA_CI_SECRET: ${{ secrets.CI_SECRET }} USE_ARTIFACT: false - DISABLE_WORKFLOW: "false" + DISABLE_WORKFLOW: "true" concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} diff --git a/.github/workflows/build-emscripten.yml b/.github/workflows/build-emscripten.yml index c52419b32..9acc226c8 100644 --- a/.github/workflows/build-emscripten.yml +++ b/.github/workflows/build-emscripten.yml @@ -18,7 +18,7 @@ env: USE_ARTIFACT: true PTHREADS_ENABLED: 1 NO_FORCE: 1 - DISABLE_WORKFLOW: "false" + DISABLE_WORKFLOW: "true" jobs: pre-check: diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index 21fd8c145..bc06b23d6 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -17,7 +17,7 @@ env: NO_FORCE: 1 GA_CI_SECRET: ${{ secrets.CI_SECRET }} USE_ARTIFACT: true - DISABLE_WORKFLOW: "false" + DISABLE_WORKFLOW: "true" jobs: pre-check: diff --git a/.github/workflows/build-linux-cross.yml b/.github/workflows/build-linux-cross.yml index fe7612af1..1f646aa5b 100644 --- a/.github/workflows/build-linux-cross.yml +++ b/.github/workflows/build-linux-cross.yml @@ -17,7 +17,7 @@ env: NO_FORCE: 1 GA_CI_SECRET: ${{ secrets.CI_SECRET }} USE_ARTIFACT: false - DISABLE_WORKFLOW: "false" + DISABLE_WORKFLOW: "true" jobs: pre-check: diff --git a/.github/workflows/build-linux64.yml b/.github/workflows/build-linux64.yml index f9ef2d4f9..35a24deb5 100644 --- a/.github/workflows/build-linux64.yml +++ b/.github/workflows/build-linux64.yml @@ -17,7 +17,7 @@ env: NO_FORCE: 1 GA_CI_SECRET: ${{ secrets.CI_SECRET }} USE_ARTIFACT: true - DISABLE_WORKFLOW: "false" + DISABLE_WORKFLOW: "true" jobs: pre-check: diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 65ab7065b..c855b26b7 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -17,7 +17,7 @@ env: NO_FORCE: 1 GA_CI_SECRET: ${{ secrets.CI_SECRET }} USE_ARTIFACT: true - DISABLE_WORKFLOW: "false" + DISABLE_WORKFLOW: "true" jobs: pre-check: diff --git a/.github/workflows/build-msys2.yml b/.github/workflows/build-msys2.yml index 047f551ed..b801af8c3 100644 --- a/.github/workflows/build-msys2.yml +++ b/.github/workflows/build-msys2.yml @@ -17,7 +17,7 @@ env: NO_FORCE: 1 GA_CI_SECRET: ${{ secrets.CI_SECRET }} USE_ARTIFACT: false - DISABLE_WORKFLOW: "false" + DISABLE_WORKFLOW: "true" jobs: pre-check: diff --git a/.github/workflows/build-tvos.yml b/.github/workflows/build-tvos.yml index a323016cf..65343484a 100644 --- a/.github/workflows/build-tvos.yml +++ b/.github/workflows/build-tvos.yml @@ -17,7 +17,7 @@ env: NO_FORCE: 1 GA_CI_SECRET: ${{ secrets.CI_SECRET }} USE_ARTIFACT: true - DISABLE_WORKFLOW: "false" + DISABLE_WORKFLOW: "true" jobs: pre-check: diff --git a/.github/workflows/build-vs2022-arm64.yml b/.github/workflows/build-vs2022-arm64.yml index 5b0919ded..5be8a91b0 100644 --- a/.github/workflows/build-vs2022-arm64.yml +++ b/.github/workflows/build-vs2022-arm64.yml @@ -19,7 +19,7 @@ env: VS_VER: 17 GA_CI_SECRET: ${{ secrets.CI_SECRET }} USE_ARTIFACT: false - DISABLE_WORKFLOW: "false" + DISABLE_WORKFLOW: "true" jobs: pre-check: diff --git a/.github/workflows/build-vs2022-arm64ec.yml b/.github/workflows/build-vs2022-arm64ec.yml index 6b42001ab..2c61efd5c 100644 --- a/.github/workflows/build-vs2022-arm64ec.yml +++ b/.github/workflows/build-vs2022-arm64ec.yml @@ -19,7 +19,7 @@ env: VS_VER: 17 GA_CI_SECRET: ${{ secrets.CI_SECRET }} USE_ARTIFACT: false - DISABLE_WORKFLOW: "false" + DISABLE_WORKFLOW: "true" jobs: pre-check: diff --git a/.github/workflows/build-vs2022-x64.yml b/.github/workflows/build-vs2022-x64.yml index bef0fa855..8db65f724 100644 --- a/.github/workflows/build-vs2022-x64.yml +++ b/.github/workflows/build-vs2022-x64.yml @@ -19,7 +19,7 @@ env: VS_VER: 17 GA_CI_SECRET: ${{ secrets.CI_SECRET }} USE_ARTIFACT: false - DISABLE_WORKFLOW: "false" + DISABLE_WORKFLOW: "true" jobs: pre-check: diff --git a/.github/workflows/build-vs2026-x64.yml b/.github/workflows/build-vs2026-x64.yml new file mode 100644 index 000000000..5bfd0f39f --- /dev/null +++ b/.github/workflows/build-vs2026-x64.yml @@ -0,0 +1,246 @@ +name: build-vs2026-64 + +on: + push: + paths-ignore: + - '**/*.md' + pull_request: + paths-ignore: + - '**/*.md' + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +env: + TARGET: "vs" + ARCH: 64 + NO_FORCE: 1 + VS_VER: 18 + GA_CI_SECRET: ${{ secrets.CI_SECRET }} + USE_ARTIFACT: false + DISABLE_WORKFLOW: "false" + VS_TYPE: "Community" + +jobs: + pre-check: + runs-on: ubuntu-latest + outputs: + workflow_disabled: ${{ steps.check-disabled.outputs.disabled }} + steps: + - name: Check if Workflow is disabled + id: check-disabled + shell: bash + run: | + if [ "${{ env.DISABLE_WORKFLOW }}" == "true" ]; then + echo "disabled=true" >> $GITHUB_ENV + echo "::set-output name=disabled::true" + else + echo "::set-output name=disabled::false" + fi + build-vs2026-64: + if: needs.pre-check.outputs.workflow_disabled != 'true' + needs: pre-check + runs-on: windows-latest + strategy: + matrix: + bundle: [1,2] + defaults: + run: + shell: msys2 {0} + steps: + - name: Check if Workflow is disabled + shell: bash + run: | + if [ "${{ env.DISABLE_WORKFLOW }}" == "true" ]; then + echo "Workflow is disabled. Exiting." + exit 78 + fi + - name: Setup msys2 + uses: msys2/setup-msys2@v2 + with: + update: true + install: >- + base-devel + unzip + dos2unix + gperf + git + python3 + mingw-w64-x86_64-binutils + mingw-w64-x86_64-clang + mingw-w64-x86_64-gcc + mingw-w64-x86_64-gcc-libs + mingw-w64-x86_64-cmake + mingw-w64-x86_64-gdb + mingw-w64-x86_64-make + - name: Clone repository + uses: actions/checkout@v4.2.2 + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + - name: Determine Release + id: vars + shell: bash + run: | + if [[ "${{ github.ref }}" == refs/tags/* ]]; then + echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV + elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then + echo "RELEASE=nightly" >> $GITHUB_ENV + elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then + echo "RELEASE=latest" >> $GITHUB_ENV + else + echo "RELEASE=latest" >> $GITHUB_ENV + fi + - name: Install Visual Studio 2026 Build Tools + run: | + $exitCode = 0 + choco install visualstudio2026buildtools ` + --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --includeRecommended --passive --norestart" ` + -y --no-progress + + $exitCode = $LASTEXITCODE + + # Exit codes: 0 = success, 3010 = success but reboot required + if ($exitCode -eq 0 -or $exitCode -eq 3010) { + Write-Host "VS2026 Installation successful (exit code: $exitCode)" + exit 0 + } else { + Write-Host "VS2026 Installation failed (exit code: $exitCode)" + exit $exitCode + } + shell: powershell + timeout-minutes: 30 + + - name: Verify Installation + run: | + Write-Host "Checking VS2026 installation..." + Get-ChildItem "C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools" -ErrorAction Stop + Write-Host "VS2026 verified successfully" + shell: powershell + - name: Scripts Install + run: ./scripts/vs/install.sh + - name: 'Download artifacts' + uses: actions/github-script@v7 + if: env.USE_ARTIFACT == 'true' + with: + script: | + const fs = require('fs'); + const path = require('path'); + // https://api.github.com/repos/openframeworks/apothecary/actions/artifacts?per_page=250 + // Ensure the output directory exists + const outputDir = path.join(process.env.GITHUB_WORKSPACE, 'out'); + if (!fs.existsSync(outputDir)){ + fs.mkdirSync(outputDir); + } + + // List all artifacts for the repository + const artifacts = await github.rest.actions.listArtifactsForRepo({ + owner: 'openframeworks', + repo: 'apothecary', + sort: 'created_at', + direction: 'desc', + per_page: 150 + }); + + const target = process.env.TARGET; + const arch = process.env.ARCH; + const bundle = process.env.MATRIX_BUNDLE; + const release = process.env.RELEASE; + const artifactName = `libs-${release}-${target}-${arch}-${bundle}`; + + let count = 0; + const max = 1; + + for (const artifact of artifacts.data.artifacts) { + const isArtifactMatch = artifact.name.includes(`libs-${release}-${target}-${arch}`) && !artifact.expired; + if (isArtifactMatch) { + const download = await github.rest.actions.downloadArtifact({ + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: artifact.id, + archive_format: 'zip', + }); + + const artifactPath = path.join(outputDir, `${artifact.name}.zip`); + fs.writeFileSync(artifactPath, Buffer.from(download.data)); + console.log(`Downloaded ${artifact.name} to ${artifactPath}`); + count++; + if (count >= max) { + break; + } + } + } + - name: Extract Artifacts to /out + if: env.USE_ARTIFACT == 'true' + run: | + mkdir -p out + if ls out/*.zip 1> /dev/null 2>&1; then + for zip in out/*.zip; do + echo "Extracting $zip..." + unzip -o "$zip" -d out/ + echo "Removing $zip..." + rm "$zip" + done + echo "First-level extraction and cleanup complete." + + # Check and extract second-level zip files and remove them + if ls out/*.zip 1> /dev/null 2>&1; then + for nested_zip in out/*.zip; do + echo "Extracting nested zip $nested_zip..." + unzip -o "$nested_zip" -d out/ + echo "Removing $nested_zip..." + rm "$nested_zip" + done + echo "Second-level extraction and cleanup complete." + else + echo "No nested zip files found." + fi + else + echo "No zip files to extract." + fi + if ls out/*.tar.bz2 1> /dev/null 2>&1; then + for tarball in out/*.tar.bz2; do + echo "Extracting $tarball..." + tar -xjf "$tarball" -C out/ + done + echo ".tar.bz2 extraction complete." + rm -f out/*.tar.bz2 + else + echo "No .tar.bz2 files to extract." + fi + # rm -f xout/*.tar.bz2 + # rm -f out/*.tar.bz2 + - name: List output directory1 + if: env.USE_ARTIFACT == 'true' + run: ls -lah out/ + - name: Build64 + working-directory: ${{env.GITHUB_WORKSPACE}} + run: scripts/build.sh + env: + BUNDLE: ${{ matrix.bundle }} + - name: Package + if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding' || contains(github.ref, 'refs/tags/')) + working-directory: ${{ env.GITHUB_WORKSPACE }} + run: scripts/package.sh + env: + BUNDLE: ${{ matrix.bundle }} + - name: Upload binaries as Artifact + if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding' ) + uses: actions/upload-artifact@v4 + env: + release: ${{ env.RELEASE }} + with: + name: libs-${{ env.RELEASE }}-${{ env.TARGET }}-${{ env.ARCH }}-${{ matrix.bundle }} + path: out/openFrameworksLibs_${{ env.RELEASE }}_${{ env.TARGET }}_2026_${{ env.ARCH }}_${{ matrix.bundle }}.zip + retention-days: 31 + + - name: Update Release x64 + if: github.repository == 'openframeworks/apothecary' && github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') + uses: softprops/action-gh-release@v2.1.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag_name: ${{ env.RELEASE }} + draft: false + files: out/openFrameworksLibs_${{ env.RELEASE }}_${{ env.TARGET }}_2026_${{ env.ARCH }}_${{ matrix.bundle }}.zip + + diff --git a/apothecary/apothecary b/apothecary/apothecary index 5ff0965bb..8dd7af86e 100755 --- a/apothecary/apothecary +++ b/apothecary/apothecary @@ -157,6 +157,10 @@ WIN10_INSTALLED_SDK_2022=10.0.20348.0 WIN10_INSTALLED_SDK_2022_HEX=0x0A004F5C WIN11_INSTALLED_SDK_2022=10.0.26100.0 WIN11_INSTALLED_SDK_2022_HEX=0x0A0065F4 +WIN10_INSTALLED_SDK_2026=10.0.XXXXX.0 +WIN10_INSTALLED_SDK_2026_HEX=0x0AXXXXXX +WIN11_INSTALLED_SDK_2026=10.0.26100.7175 +WIN11_INSTALLED_SDK_2026_HEX=0x0A0065F4 if [ -z "${VS_TYPE+x}" ]; then # Professional # Enterprise # Community VS_TYPE=Community @@ -367,7 +371,7 @@ while getopts t:a:b:d:s:j:m:c:hgvxfpewy opt ; do VERBOSE_MAKEFILE=YES ;; e) # use visual enterprise - export VS_TYPE=Enterprise ;; + export VS_TYPE=Community ;; f) # force download export FORCE_DOWNLOAD=1 ;; y) # use pthreads @@ -664,6 +668,12 @@ if [ "$TYPE" = "vs" ]; then VS_YEAR=2022 VC_VERSION=143 VS_BAT="vcvars$ARCH.bat" + elif [ "${VS_VER}" = "18" ]; then + VS_BASE_PATH="${DRIVE}/Program Files/Microsoft Visual Studio/18/$VS_TYPE" + export VS_BASE_PATH_CLANG="${DRIVE}/Program Files/Microsoft Visual Studio/18/" + VS_YEAR=2026 + VC_VERSION=144 + VS_BAT="vcvars$ARCH.bat" fi fi if [ $ARCH == 32 ] ; then @@ -743,6 +753,20 @@ if [ "$TYPE" = "vs" ]; then export CMAKE_WIN_SDK_HEX=${WIN10_INSTALLED_SDK_2022_HEX} fi + if [ $VS_COMPILER == "LLVM" ]; then + export CMAKE_WIN_SDK="${CMAKE_WIN_SDK} -DCMAKE_CXX_COMPILER=${VS_BIN_PATH}/clang++ -DCMAKE_C_COMPILER=${VS_BIN_PATH}/clang -T ClangCL -DLLVM_ENABLE_RUNTIMES=libcxx -DLIBCXX_ENABLE_SHARED=NO -DLIBCXX_ENABLE_STATIC=YES" + fi + elif [ $VS_VER == "18" ]; then + export VS_YEAR=2026 + export VS_VER=18 + export VS_VER_GEN="$VS_VER $VS_YEAR" + if [ $ARCH == "arm64ec" ] || [ $TARGET_WIN_11 == 1 ]; then + export CMAKE_WIN_SDK="-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=${WIN11_INSTALLED_SDK_2026} -DCMAKE_SYSTEM_VERSION=${WIN11_INSTALLED_SDK_2026} " + export CMAKE_WIN_SDK_HEX=${WIN11_INSTALLED_SDK_2026_HEX} + else + export CMAKE_WIN_SDK="-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=${WIN10_INSTALLED_SDK_2026} -DCMAKE_SYSTEM_VERSION=${WIN10_INSTALLED_SDK_2026} " + export CMAKE_WIN_SDK_HEX=${WIN10_INSTALLED_SDK_2026_HEX} + fi if [ $VS_COMPILER == "LLVM" ]; then export CMAKE_WIN_SDK="${CMAKE_WIN_SDK} -DCMAKE_CXX_COMPILER=${VS_BIN_PATH}/clang++ -DCMAKE_C_COMPILER=${VS_BIN_PATH}/clang -T ClangCL -DLLVM_ENABLE_RUNTIMES=libcxx -DLIBCXX_ENABLE_SHARED=NO -DLIBCXX_ENABLE_STATIC=YES" fi diff --git a/scripts/package.sh b/scripts/package.sh index 080eeb279..f9ae70d61 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -151,6 +151,9 @@ elif [ "$TARGET" == "vs" ]; then if [ "${VS_VER}" == "16" ]; then echo "VS2019 Version" TARGET="${TARGET}_2019" + elif [ "${VS_VER}" == "18" ]; then + echo "VS2026 Version" + TARGET="${TARGET}_2026" fi fi if [ -n "$PBUNDLE" ]; then