Compare commits

...

273 Commits

Author SHA1 Message Date
Amin Ya 04f0267e50
Merge pull request #449 from aminya/renovate/major-dependencies
fix(deps): update dependencies (major)
2026-01-19 17:55:10 -08:00
renovate[bot] 1155f23302
fix(deps): update dependencies 2026-01-20 01:22:19 +00:00
Amin Ya 867d72f10a
Merge pull request #437 from aminya/renovate/dependencies
fix(deps): update dependencies
2026-01-19 17:20:24 -08:00
renovate[bot] daf5d4b9da
fix(deps): update dependencies 2026-01-20 01:20:16 +00:00
Amin Ya 31141736b3
Merge pull request #444 from aminya/renovate/major-github-artifact-actions
chore(deps): update github artifact actions (major)
2026-01-19 17:20:01 -08:00
Amin Ya 9792a2bbe0
Merge pull request #459 from aminya/renovate/fedora-44.x
chore(deps): update fedora docker tag to v44
2026-01-19 17:19:36 -08:00
renovate[bot] 27061795a8
chore(deps): update github artifact actions 2026-01-19 08:08:16 +00:00
Amin Ya 1f17f92d6a chore(release): v1.8.0 [skip test] 2026-01-18 23:58:27 -08:00
Amin Ya bd777f32ba
fix: default to LLVM 20.1.8 (#460) 2026-01-18 23:52:00 -08:00
Amin Ya f3c42a2724 chore(deps): update fedora docker tag to v44 2026-01-18 23:40:57 -08:00
renovate[bot] 38bbe83367
chore(deps): update fedora docker tag to v44 2026-01-19 07:40:03 +00:00
renovate[bot] 156935991e
chore(deps): update node.js to v22.22.0 (#456)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-18 23:37:41 -08:00
renovate[bot] 51ca1f1f80
chore(deps): update dependency turbo to v2.7.5 (#458)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-18 23:37:23 -08:00
renovate[bot] 5c16b2f2fd
chore(deps): update actions/cache action to v5 (#457)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-18 23:37:09 -08:00
Amin Ya 7c7690a1ac
feat: update default LLVM, Mingw, CMake, Ninja, Task, Meson (#455)
* feat: update LLVM to 21.1.8 + Mingw to 15.2

* feat: update ninja, cmake, task, meson

* fix: downgrade fedora to 43

* fix: upgrade doxygen
2026-01-15 15:20:14 -08:00
renovate[bot] aaf5bb78ea
chore(deps): update devdependencies (#430)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-15 04:19:20 -08:00
renovate[bot] 4878b35f60
chore(deps): update fedora docker tag to v44 (#440) [skip ci]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-15 04:17:24 -08:00
renovate[bot] 957a3565d3
chore(deps): update peter-evans/dockerhub-description action to v5 (#442) [skip ci]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-15 04:16:44 -08:00
renovate[bot] aa2e7dbda1
chore(deps): update actions/setup-node action to v6 (#443) [skip ci]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-15 04:15:08 -08:00
Amin Ya c9b0b918df
feat: use bun as the package manager (#454) [skip ci]
* feat: use bun as the package manager

* fix: update vite to the latest version

* ci: setup node as well as bun

* fix: use node to run minijson

* ci: use MacOS 14 large instead of MacOS 13

* ci: use macos-15-intel instead

* fix: apply patches manually
2026-01-15 04:14:40 -08:00
renovate[bot] 9306008c10
chore(deps): update actions/checkout action to v6 (#451) [skip ci]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-15 04:14:08 -08:00
Amin Yahyaabadi 9bc9b8cd8a chore(release): v1.7.2 [skip test] 2025-11-10 00:13:02 -08:00
Amin Ya 3481e9e840
feat: support LLVM 21 + GCC 15.2 (#447) 2025-11-10 00:10:16 -08:00
renovate[bot] cc0e9fb8ec
chore(deps): update actions/download-artifact action to v5 (#434)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 00:04:40 -07:00
renovate[bot] 131fbe52b0
chore(deps): update actions/checkout action to v5 (#435)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 00:04:08 -07:00
renovate[bot] d93d404f38
fix(deps): update dependency @types/node to v22.17.2 (#431)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 00:03:50 -07:00
renovate[bot] a55b1da658
chore(deps): update pnpm to v10.15.0 (#432)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-25 00:03:37 -07:00
Amin Ya 24822b26f9
Merge pull request #429 from aminya/build-improve
feat: add a unified setup-options for all setup functions
2025-07-10 09:46:29 -07:00
Amin Yahyaabadi 747e9cfe05 fix: fix partial options for tar 2025-07-10 07:11:16 -07:00
Amin Yahyaabadi 26bd7cda45 fix: allow partial options for setup tools 2025-07-10 06:59:25 -07:00
Amin Yahyaabadi 6f1d3cd81e fix: add setup-options for all setup functions 2025-07-10 06:59:25 -07:00
Amin Yahyaabadi bb0daa4e32 build: use esbuild for minification
Size is not much of a concern for setup-cpp and the difference is few KB.
2025-07-10 06:59:25 -07:00
Amin Yahyaabadi a276e6e3d1 chore(release): v1.7.1 [skip test] 2025-07-10 06:52:11 -07:00
Amin Yahyaabadi 1c89539b8f fix: handle no update failures for llvm 2025-07-07 22:42:22 -07:00
renovate[bot] b32feb04d5
chore(deps): update devdependencies (#426)
* chore(deps): update devdependencies

* fix: fix babel config

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Amin Yahyaabadi <aminyahyaabadi74@gmail.com>
2025-07-06 04:50:43 -07:00
Amin Ya d8571402cb
Merge pull request #425 from aminya/windows-llvm
fix: prefer complete Window LLVM package + add tar tool
2025-07-03 07:23:39 -07:00
Amin Ya aa0fcb9bee fix: use 7z for tar extraction on windows 2025-07-03 06:58:13 -07:00
Amin Yahyaabadi 988cdb3377 fix: extra tar by 7z on windows 2025-07-03 06:32:22 -07:00
Amin Ya d09e6b8dab
Merge pull request #418 from aminya/renovate/dependencies
fix(deps): update dependency @types/node to v22.16.0
2025-07-03 05:47:27 -07:00
renovate[bot] c43a237684
fix(deps): update dependency @types/node to v22.16.0 2025-07-03 12:47:18 +00:00
Amin Ya 6004eca28b
Merge pull request #423 from aminya/renovate/node-22.x
chore(deps): update node.js to v22.17.0
2025-07-03 05:46:53 -07:00
renovate[bot] d42bb0b88f
chore(deps): update node.js to v22.17.0 2025-07-03 12:46:46 +00:00
Amin Ya c9eb020813
Merge pull request #421 from aminya/renovate/pnpm-10.x
chore(deps): update pnpm to v10.12.4
2025-07-03 05:46:39 -07:00
renovate[bot] 3cb32ec74d
chore(deps): update pnpm to v10.12.4 2025-07-03 12:45:58 +00:00
Amin Ya fb3f6ad2f8
Merge pull request #424 from aminya/update
fix: add LLVM 20.1.7 + mingw 15.1-r2 + gcovr via apt on Ubuntu by default
2025-07-03 05:45:03 -07:00
Amin Yahyaabadi 559fcdd572 feat: add tar as an installable tool 2025-07-03 05:42:22 -07:00
Amin Yahyaabadi 8e6c0edd38 fix: strip components for windows LLVM tar.xz 2025-07-03 05:26:22 -07:00
Amin Yahyaabadi 8ffe76cee3 fix: prefer complete Window LLVM package 2025-07-03 04:57:50 -07:00
Amin Yahyaabadi 0fa8654824 fix: fix apt resolving on non-Linux 2025-07-03 04:56:17 -07:00
Amin Yahyaabadi 928af1ef3b ci: remove deprecated windows 2019 2025-07-03 04:45:30 -07:00
Amin Yahyaabadi 751b635450 fix: install gcovr via apt on Ubuntu by default 2025-07-03 04:44:58 -07:00
Amin Yahyaabadi 056bb3b1d9 fix: add LLVM 20.1.7 + mingw 15.1-r2 2025-07-02 04:32:00 -07:00
Amin Ya fe10751e1c
Merge pull request #417 from aminya/renovate/dependencies
fix(deps): update dependency @types/node to v22.15.30
2025-06-08 21:57:19 -07:00
Amin Ya c0171961c2
Merge pull request #416 from aminya/renovate/pnpm-10.x
chore(deps): update pnpm to v10.12.1
2025-06-08 21:57:11 -07:00
renovate[bot] ce9f94db97
chore(deps): update devdependencies (#415)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-08 21:56:50 -07:00
renovate[bot] 9392dd1bd8
chore(deps): update pnpm to v10.12.1 2025-06-08 17:47:30 +00:00
renovate[bot] 2e6bb1caa0
fix(deps): update dependency @types/node to v22.15.30 2025-06-08 07:52:37 +00:00
Amin Yahyaabadi 004edc1952 chore(release): v1.7.0 [skip test] 2025-06-08 00:46:36 -07:00
Amin Ya 46cbfc276f
Merge pull request #414 from aminya/updates
fix: update cmake, task, powershell, meson, doxygen
2025-06-06 02:31:27 -07:00
Amin Yahyaabadi 396258ba63 fix: update doxygen to 1.14.0 2025-06-05 01:44:23 -07:00
Amin Yahyaabadi 70e614fd48 fix: update meson to 1.8.1 2025-06-05 01:41:07 -07:00
Amin Yahyaabadi 075261cd2b fix: update powershell to 7.5.1 2025-06-05 01:40:37 -07:00
Amin Yahyaabadi fcda129998 fix: update task to 3.43.3 2025-06-05 01:40:18 -07:00
Amin Yahyaabadi 42ccc76417 fix: update cmake to 3.31.7 2025-06-05 01:38:12 -07:00
Amin Ya af7dd8c367
Merge pull request #387 from aminya/bump-llvm
fix: update default LLVM to v20 + GCC 15
2025-06-03 02:58:32 -07:00
Amin Yahyaabadi b21cd99e0b fix: default to llvm 19 on alpine 2025-06-03 01:51:55 -07:00
Amin Yahyaabadi 085eecfbd1 fix: remove the vcpkg pin for alpine 2025-06-03 01:40:06 -07:00
Amin Yahyaabadi 197080ad94 test: default to gcc 15 on Mac and Windows 2025-06-03 01:27:40 -07:00
Amin Yahyaabadi 15c6190549 fix: add newer llvm 20 versions 2025-06-03 00:43:01 -07:00
Amin Yahyaabadi 38b4d16f6e fix: update default LLVM to v20 2025-06-03 00:39:28 -07:00
renovate[bot] 00a96b353f
chore(deps): update dependency turbo to v2.5.4 (#411)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-03 00:39:00 -07:00
Amin Ya 8d6f65af17
Merge pull request #413 from aminya/renovate/dependencies
fix(deps): update dependency @types/node to v22.15.29
2025-06-03 00:21:13 -07:00
renovate[bot] 55470af31b
fix(deps): update dependency @types/node to v22.15.29 2025-05-31 02:22:01 +00:00
renovate[bot] 820b8f3163
chore(deps): update devdependencies (#412)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-26 22:07:57 -07:00
Amin Yahyaabadi 3a19939866 fix: handle no version for cmake 2025-05-26 22:07:03 -07:00
renovate[bot] 3b773c4e87
chore(deps): update dependency npm-run-all2 to v8.0.4 (#410)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-25 14:24:49 -07:00
renovate[bot] 0d11c74dbd
chore(deps): update dependency @aminya/minijson to v1.1.3 (#409)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-24 23:57:23 -07:00
Amin Ya f0dab3c2eb
Merge pull request #404 from aminya/renovate/dependencies
fix(deps): update dependency @types/node to v22.15.21
2025-05-24 23:54:25 -07:00
renovate[bot] f015113d31
fix(deps): update dependency @types/node to v22.15.21 2025-05-24 11:11:49 +00:00
Amin Yahyaabadi 9dc9c217f4 chore: v1.6.2 2025-05-24 04:07:26 -07:00
Amin Yahyaabadi 5649ee9e2d chore: v1.6.1 2025-05-24 04:02:55 -07:00
Amin Yahyaabadi ecb2ccca2e chore: add npm ignore to reduce package size 2025-05-24 04:02:24 -07:00
Amin Ya 2a58e75f05
Merge pull request #407 from aminya/pin
fix: pin the apt-fast and nala installers
2025-05-24 03:41:16 -07:00
renovate[bot] f1825e19b6
chore(deps): update devdependencies (#403)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-24 03:41:03 -07:00
Amin Ya e09ae7eb8e
Merge pull request #405 from aminya/renovate/node-22.x
chore(deps): update node.js to v22.16.0
2025-05-24 01:01:19 -07:00
renovate[bot] 45a956b27e
chore(deps): update devdependencies (#406)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-24 01:00:58 -07:00
Amin Yahyaabadi 1cfde8e589 fix: pin the apt-fast and nala installers 2025-05-24 00:58:55 -07:00
renovate[bot] a4ca8de391
chore(deps): update node.js to v22.16.0 2025-05-24 06:55:24 +00:00
Amin Yahyaabadi 022729da27 Revert "chore(deps): update noelware/docker-manifest-action action to v1"
This reverts commit 80ffb63efd.
2025-05-22 04:24:55 -07:00
Amin Yahyaabadi 6b72a94712 chore(release): v1.6.0 2025-05-22 03:56:32 -07:00
Amin Ya 464f3a00d5
Merge pull request #402 from aminya/faster-fast-apt
fix: add apt-fast optimizations
2025-05-20 22:15:55 -07:00
Amin Yahyaabadi faff663ab1 fix: add apt-fast optimizations 2025-05-20 21:38:17 -07:00
Amin Ya da1971da81
Merge pull request #401 from aminya/apt-fast
feat: add apt-fast as an installable tool
2025-05-20 16:09:08 -07:00
Amin Ya dbf5b5e2bf
Merge pull request #398 from aminya/renovate/node-22.x
chore(deps): update node.js to v22.15.1
2025-05-20 13:00:12 -07:00
Amin Yahyaabadi 3fd1b0b32c test: do not print version of apt-fast 2025-05-20 12:56:59 -07:00
Amin Yahyaabadi 988b5fd210 fix: update the apt-fast config as root 2025-05-20 12:32:52 -07:00
Amin Yahyaabadi c9348d3629 test: do not remove apt-fast 2025-05-20 12:17:00 -07:00
Amin Yahyaabadi 9b5350fb6e test: run apt tests in series 2025-05-20 11:18:37 -07:00
Amin Yahyaabadi b7dcc5b7e6 fix: do not use apt due to race conditions 2025-05-20 03:32:09 -07:00
Amin Yahyaabadi 264de9ab1a test: add import tests for all packages 2025-05-20 03:26:08 -07:00
Amin Yahyaabadi fc5f36e99b test: add import tests for all packages 2025-05-20 03:23:35 -07:00
Amin Yahyaabadi 1134b80cc2 chore: use turbo for build 2025-05-20 02:52:27 -07:00
Amin Yahyaabadi 6540167f34 feat move setup-nala to setup-apt 2025-05-20 02:39:27 -07:00
Amin Yahyaabadi 62036a9dd7 feat: move the apt-fast installer to setup-apt package 2025-05-20 02:32:22 -07:00
Amin Yahyaabadi 350b16f518 fix: prefer apt-fast or apt over apt-get 2025-05-20 02:23:12 -07:00
Amin Yahyaabadi 4c0bf0acdb fix: make apt-fast non-interactive 2025-05-20 02:17:12 -07:00
Amin Yahyaabadi ecc6c767e0 feat: add apt-fast as an installable tool 2025-05-20 01:52:30 -07:00
Amin Yahyaabadi 00fe6df1cf fix: rename isUbuntu to hasAptget 2025-05-20 01:43:24 -07:00
renovate[bot] 46ac5adacc
chore(deps): update node.js to v22.15.1 2025-05-20 04:27:57 +00:00
Amin Ya e10853e3f5
Merge pull request #399 from aminya/renovate/pnpm-10.x
chore(deps): update pnpm to v10.11.0
2025-05-19 21:26:58 -07:00
Amin Ya 3fffbe9648
Merge pull request #400 from aminya/renovate/noelware-docker-manifest-action-1.x
chore(deps): update noelware/docker-manifest-action action to v1
2025-05-19 21:26:43 -07:00
Amin Ya c9145519e3
Merge pull request #395 from aminya/renovate/dependencies
fix(deps): update dependency @types/node to v22.15.19
2025-05-19 21:26:06 -07:00
renovate[bot] 5c5dffcda7
chore(deps): update devdependencies (#382)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-19 20:44:28 -07:00
renovate[bot] 6c94aa9d63
fix(deps): update dependency @types/node to v22.15.19 2025-05-19 16:17:25 +00:00
renovate[bot] 80ffb63efd
chore(deps): update noelware/docker-manifest-action action to v1 2025-05-17 06:50:14 +00:00
renovate[bot] 5accdbc0a7
chore(deps): update pnpm to v10.11.0 2025-05-17 02:36:48 +00:00
renovate[bot] d8c2b30cb3
chore(deps): update dependency cspell to v9 (#396)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-11 17:09:01 -07:00
Amin Yahyaabadi 829f53844a ci: disable arch llvm and alpine mingw [skip test] 2025-05-09 21:52:41 -07:00
Amin Yahyaabadi 28288fd7bc chore(release): v1.5.4 [skip test] 2025-05-09 20:49:48 -07:00
Amin Ya 5ea110ae8d
Merge pull request #397 from aminya/bashrc-loop [skip ci]
fix: avoid rc sourcing loops + fix: always add guards for sourcing rc files
2025-05-09 20:46:40 -07:00
Amin Yahyaabadi 9bc8921c0a ci: disable deprecated ubuntu 20 2025-05-09 20:46:08 -07:00
Amin Yahyaabadi e8ac0e7160 fix: add rcOptions for vcpkg system binaries 2025-05-09 20:45:21 -07:00
Amin Yahyaabadi 9d12750bbe fix: always add guards for sourcing rc files 2025-05-09 20:43:23 -07:00
Amin Yahyaabadi c9007c8f5a fix: avoid rc sourcing loops 2025-05-09 20:41:22 -07:00
Amin Yahyaabadi 05bd2b5297 fix: fix llvm add-apt-repository for debian 2025-05-05 05:10:57 -07:00
renovate[bot] 3d8c387d48
chore(deps): update dependency npm-run-all2 to v8 (#394)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-04 20:17:03 -07:00
Amin Yahyaabadi 55f022dea4 fix: fix add-apt-repository in Debian 2025-05-04 06:24:26 -07:00
Amin Yahyaabadi 75890615f7 fix: fix addition of git to PATH on Windows 2025-04-30 12:39:42 -07:00
Amin Ya a7162273d0
Merge pull request #393 from aminya/renovate/dependencies
fix(deps): update dependency @types/node to v22.15.3
2025-04-30 12:11:14 -07:00
Amin Ya f40cb3bc3f
Merge pull request #392 from aminya/renovate/node-22.x
chore(deps): update node.js to v22.15.0
2025-04-30 12:11:04 -07:00
Amin Yahyaabadi ac92a10732 fix: update pnpm + fix cspell 2025-04-30 12:09:38 -07:00
Amin Yahyaabadi d10f4b6db0 fix: ignore setup-cpp cli installation errors 2025-04-30 12:05:24 -07:00
renovate[bot] 8fb6bd1b28
fix(deps): update dependency @types/node to v22.15.3 2025-04-30 19:01:13 +00:00
renovate[bot] a993d3ff56
chore(deps): update node.js to v22.15.0 2025-04-30 19:00:30 +00:00
Amin Yahyaabadi d0235b0adb ci: add missing git option for actions 2025-04-30 11:57:57 -07:00
Amin Ya 79f7ff95eb
Merge pull request #383 from aminya/renovate/dependencies
fix(deps): update dependency @types/node to v22.14.1
2025-04-21 09:47:53 -07:00
Amin Ya 3bc026fd01
Merge pull request #384 from aminya/renovate/pnpm-10.x
chore(deps): update pnpm to v10.9.0
2025-04-21 09:47:38 -07:00
Amin Ya 6c5ed96033
Merge pull request #390 from aminya/renovate/rharkor-caching-for-turbo-1.x
chore(deps): update rharkor/caching-for-turbo action to v1.8
2025-04-21 09:47:18 -07:00
renovate[bot] 70850773b2
chore(deps): update devdependencies (#391)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-21 11:46:58 -05:00
renovate[bot] 186f2dc52d
chore(deps): update pnpm to v10.9.0 2025-04-21 09:36:15 +00:00
renovate[bot] b683fdffce
chore(deps): update rharkor/caching-for-turbo action to v1.8 2025-04-12 02:23:30 +00:00
renovate[bot] bb5b6b1b44
fix(deps): update dependency @types/node to v22.14.1 2025-04-11 23:24:46 +00:00
Amin Yahyaabadi 6370aaa025 fix: remove exports map from package 2025-04-07 07:24:19 -07:00
Amin Yahyaabadi 95a7de4f2e fix: fix CLI shabang not working - independent lib 2025-04-07 07:21:37 -07:00
Amin Yahyaabadi d6447bbe91 fix: build cli independent of lib 2025-04-07 06:25:39 -07:00
Amin Yahyaabadi 71c0122abf chore(release): v1.5.0 [skip test] 2025-04-07 02:59:09 -07:00
Amin Ya ad7d44b1e3
Merge pull request #388 from aminya/llvm
fix: do not add LLVM libraries to dyld by default
2025-04-07 02:54:48 -07:00
Amin Yahyaabadi 7e66da1495 fix: do not add LLVM libraries to dyld by default
On MacOS, the LLVM binaries could conflict with the system libraries. It's better to intentionally use the LLVM binaries.

Now, `LLVM_DYLD_LIBRARY_PATH` and `LLVM_LD_LIBRARY_PATH` are used instead of `DYLD_LIBRARY_PATH` and `LD_LIBRARY_PATH`.

In bashrc, after sourcing cpprc, you could
```shell
export LD_LIBRARY_PATH="$LLVM_LD_LIBRARY_PATH;$LD_LIBRARY_PATH"
export DYLD_LIBRARY_PATH="$LLVM_DYLD_LIBRARY_PATH;$DYLD_LIBRARY_PATH"
```
2025-04-07 02:37:30 -07:00
Amin Ya f37a612a84
Merge pull request #389 from aminya/alpine-vcpkg-arm64
fix: pin vcpkg on Alpine Arm64
2025-04-07 02:36:22 -07:00
Amin Yahyaabadi d60a91780b fix: pin vcpkg on Alpine Arm64 2025-04-07 02:01:46 -07:00
Amin Ya a5ee5b0e9b
Merge pull request #386 from aminya/library
feat: allow using setup-cpp as a library
2025-04-07 01:22:11 -07:00
Amin Yahyaabadi dc7c474237 fix: set the exit error code correctly 2025-04-07 01:20:02 -07:00
Amin Yahyaabadi a8782096b0 fix: add types for the library usage 2025-04-06 23:51:21 -07:00
Amin Yahyaabadi f5f4ddffea fix: bundle CLI deps via vite 2025-04-06 23:30:44 -07:00
Amin Yahyaabadi 6ef4c24024 fix: transform CLI via SWC reusing lib bundle 2025-04-06 23:12:55 -07:00
Amin Yahyaabadi d1834415a9 fix: return results of the installation in lib mode 2025-04-06 21:53:09 -07:00
Amin Yahyaabadi 68964ee26c feat: allow using setup-cpp as a library 2025-04-06 21:30:53 -07:00
Amin Yahyaabadi 6ee48d5c81 docs: add alpine images to readme [skip ci] 2025-04-03 11:43:38 -07:00
Amin Yahyaabadi fc7a5158bd chore(release): v1.4.0 [skip test] 2025-03-23 17:36:30 -07:00
Amin Ya 1837c0d47a
Merge pull request #381 from aminya/docker-versions
ci: add docker tags with the base platform versions
2025-03-23 17:33:12 -07:00
Amin Yahyaabadi 83d70f96bc ci: add docker tags with the base platform versions 2025-03-23 17:13:15 -07:00
Amin Ya be9dd533df
Merge pull request #379 from aminya/alpine
feat: support Alpine + add setup-alpine package + detect externally managed python
2025-03-23 12:25:49 -07:00
Amin Yahyaabadi 2e04f42cca ci: do not test mingw on alpine 2025-03-23 11:33:22 -07:00
Amin Yahyaabadi 6ecab5ef9d fix: fix ninja version on Alpine 2025-03-23 11:25:33 -07:00
Amin Yahyaabadi 8eb691a796 ci: build alpine on Arm64 2025-03-23 11:17:40 -07:00
Amin Yahyaabadi 895d69ee98 fix: fix the docker entrypoint on Alpine 2025-03-23 11:09:49 -07:00
renovate[bot] 8e78c541a2
chore(deps): update dependency rollup to v4.37.0 (#380)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-23 11:07:13 -07:00
Amin Yahyaabadi c04f432701 test: add examples for alpine docker 2025-03-23 04:44:35 -07:00
Amin Yahyaabadi 24ed36b061 fix: fix pipx installation on arch 2025-03-23 04:42:47 -07:00
Amin Yahyaabadi d34b955da5 feat: support community repo for alpine 2025-03-23 04:35:28 -07:00
Amin Yahyaabadi ae24e964ab fix: fix powershell/mingw installation on alpine 2025-03-23 04:27:28 -07:00
Amin Yahyaabadi 8a0c8a726b fix: do not remove apk-tools 2025-03-23 04:15:53 -07:00
Amin Yahyaabadi ad49f54a72 fix: fix extraction deps on alpine 2025-03-23 04:07:31 -07:00
Amin Yahyaabadi f23c0b8778 fix: install base compilers for vcpkg on alpine 2025-03-23 04:02:35 -07:00
Amin Yahyaabadi d8d2caee94 fix: fix llvm installation on alpine 2025-03-23 03:54:01 -07:00
Amin Yahyaabadi 477dd40685 fix: ignore version for doxygen on alpine 2025-03-23 03:52:33 -07:00
Amin Yahyaabadi 2ee99e208e fix: install cmake/ninja via system for alpine 2025-03-23 03:52:07 -07:00
Amin Yahyaabadi 0730cb5e36 fix: ensure env is set for the current process 2025-03-23 03:03:13 -07:00
Amin Yahyaabadi 5b56272eaf fix: fix pkgconf name for alpine 2025-03-23 02:57:26 -07:00
Amin Yahyaabadi bcc7fc2a92 fix: rename installApkPack for consistency 2025-03-23 02:55:38 -07:00
Amin Yahyaabadi d04bcbf1dc fix: fix vcpkg deps on alpine 2025-03-23 02:54:16 -07:00
Amin Yahyaabadi e6bd753a7f fix: do not try installing externally managed pip packages 2025-03-23 02:51:37 -07:00
Amin Yahyaabadi 4d2ad5fc8b fix: fix python3 prefix for alpine packages 2025-03-23 02:43:22 -07:00
Amin Yahyaabadi 1158c50fa0 fix: detect externally managed pythons 2025-03-23 02:40:21 -07:00
Amin Yahyaabadi 9a2e61232c fix: do not use python prefix for pipx installation 2025-03-23 01:53:17 -07:00
Amin Yahyaabadi 4c992d0556 fix: fix pip package installation on alpine 2025-03-23 01:49:31 -07:00
Amin Yahyaabadi ba81f6ae16 fix: do not use root for apk update 2025-03-23 01:46:00 -07:00
Amin Yahyaabadi 5a0bbafcb2 feat: install bash for alpine 2025-03-23 01:40:17 -07:00
Amin Yahyaabadi 3108fdcf8d ci: add docker images for testing alpine 2025-03-23 01:25:57 -07:00
Amin Yahyaabadi dd785bad39 feat: add alpine installers for all tools 2025-03-23 01:18:33 -07:00
Amin Yahyaabadi 18f6af3e6c feat: support installing specific versions for alpine 2025-03-23 01:04:45 -07:00
Amin Yahyaabadi f737a07371 feat: add setup-alpine package 2025-03-23 00:57:08 -07:00
Amin Yahyaabadi 6cd53aa7e2 ci: fix creation manifests for images with suffix [skip test] 2025-03-22 23:36:58 -07:00
Amin Yahyaabadi f4fab9f74a ci: create multi-arch manifest for ubuntu 20/24 [skip test] 2025-03-22 22:32:09 -07:00
Amin Yahyaabadi 7974077db1 docs: update setup-cpp version in the readme [skip test] 2025-03-22 20:26:13 -07:00
Amin Yahyaabadi 045f4c5242 chore(release): v1.3.0 [skip test] 2025-03-22 20:22:46 -07:00
renovate[bot] 2fe3219ef1
chore(deps): update devdependencies (#376)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-22 20:15:18 -07:00
Amin Ya 7ea6387acb
Merge pull request #377 from aminya/renovate/pnpm-10.x
chore(deps): update pnpm to v10.6.5
2025-03-22 18:39:25 -07:00
Amin Ya 01ccf4c1cc
Merge pull request #378 from aminya/renovate/dependencies
fix(deps): update dependency @types/node to v22.13.11
2025-03-22 18:39:04 -07:00
Amin Ya be9505b2e5
Merge pull request #375 from aminya/ubuntu-base-versions
feat: add Ubuntu 20 and 24 docker builds
2025-03-22 18:38:44 -07:00
Amin Yahyaabadi 2428548d77 fix: fix venv check for ubuntu 20 2025-03-22 17:56:47 -07:00
Amin Yahyaabadi ae4905b61c fix: add groups for python installation sections 2025-03-22 17:52:31 -07:00
Amin Yahyaabadi 8b1e80507e fix: skip double pipx installation if not needed 2025-03-22 17:33:51 -07:00
Amin Yahyaabadi af1b02b5ed fix: use apt-get instead of nala in setup-cpp Ubuntu images 2025-03-22 17:10:46 -07:00
renovate[bot] 9845e6e84d
fix(deps): update dependency @types/node to v22.13.11 2025-03-22 06:03:08 +00:00
renovate[bot] 1273879b4d
chore(deps): update pnpm to v10.6.5 2025-03-22 02:45:08 +00:00
Amin Yahyaabadi a96be2f0e6 feat: add Ubuntu 20 and 24 docker builds 2025-03-21 15:58:59 -07:00
Amin Yahyaabadi fd0d475a53 chore: do not run publish for the root [skip ci] 2025-03-16 21:24:27 -07:00
Amin Yahyaabadi 81892a4640 chore(release): v1.2.2 [skip test] 2025-03-16 21:22:18 -07:00
Amin Ya d11e5d7d70
Merge pull request #373 from aminya/linux-arm-ci
feat: install sccache on latest ubuntu arm
2025-03-16 21:16:12 -07:00
Amin Yahyaabadi 29c12dc98c feat: install sccache on latest ubuntu arm 2025-03-16 20:26:54 -07:00
Amin Ya a63071ebb3
Merge pull request #363 from aminya/linux-arm-ci
ci:  tests and executables for Linux arm + fix Doxygen, Sccache on Linux Arm + fix old LLVM on latest Ubuntu arm + fix apt installation fallbacks to latest
2025-03-16 03:04:58 -07:00
Amin Yahyaabadi 8115710285 fix: fix apt cache check and version fallback 2025-03-16 02:48:07 -07:00
Amin Yahyaabadi 660206b3e3 fix: fix falling back to latest for apt 2025-03-16 02:00:27 -07:00
Amin Yahyaabadi b59e0ce00b fix: fix the libtinfo5 download link on Linux arm 2025-03-16 01:40:18 -07:00
Amin Yahyaabadi 374c0cd9ec fix: fallback to the latest doxygen on Linux arm 2025-03-16 01:31:40 -07:00
Amin Yahyaabadi 2250f08263 test: skip infer, sccache, bazel tests on Linux arm 2025-03-16 01:29:22 -07:00
Amin Yahyaabadi 1916446e22 fix: add script for updating all asset lists 2025-03-16 01:29:22 -07:00
Amin Yahyaabadi 67fad8bf37 fix: upgrade Doxygen to 1.13.2 2025-03-16 01:29:22 -07:00
Amin Yahyaabadi a4bc77491c fix: fix Bazel installation on Linux arm64 2025-03-16 01:29:22 -07:00
Amin Yahyaabadi a835d4b72e fix: install the default Doxygen version on Linux
Update versions.json

Update doxygen.ts
2025-03-16 01:29:22 -07:00
Amin Yahyaabadi 6ef1af9182 fix: fix vcpkg bootstrap test in home with spaces 2025-03-16 01:29:22 -07:00
Amin Yahyaabadi fb55d3cdfe fix: brew isn't supported on Linux arm 2025-03-16 00:22:54 -07:00
Amin Yahyaabadi 29cd2e193a ci: tests and executables for Linux arm 2025-03-16 00:20:53 -07:00
Amin Ya 1d64427488
Merge pull request #372 from aminya/renovate/pnpm-10.x
chore(deps): update pnpm to v10.6.3
2025-03-14 20:42:25 -07:00
renovate[bot] 3cc2476a87
chore(deps): update devdependencies (#371)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-14 20:41:53 -07:00
renovate[bot] 56767a8edb
chore(deps): update pnpm to v10.6.3 2025-03-15 01:50:20 +00:00
Amin Yahyaabadi a76dd1b9e9 ci: improve docker cache hits by using the exact tag 2025-03-10 23:09:27 -07:00
Amin Yahyaabadi 12841b3f65 chore(release): v1.2.1 [skip test] 2025-03-10 22:17:00 -07:00
Amin Yahyaabadi b4d8a5c5a6 ci: fix the docker tags to be 1.2.0 [skip test] 2025-03-10 22:10:31 -07:00
Amin Yahyaabadi f51e073858 chore(release): v1.2.0 2025-03-10 21:31:55 -07:00
Amin Yahyaabadi 828e0bb625 fix: fix brew warning GitHub Actions matcher 2025-03-10 21:30:33 -07:00
Amin Yahyaabadi f3b54ce57b fix: simplify brew warning matcher 2025-03-10 21:28:50 -07:00
Amin Ya 413acc39d5
Merge pull request #370 from aminya/performance-polyfill
fix: polyfill performance for crypto randomuuid
2025-03-10 19:38:20 -07:00
Amin Yahyaabadi 7fee45544a fix: polifyll performance for crypto randomuuid 2025-03-10 02:07:13 -07:00
Amin Ya a2dc2bcd46
Merge pull request #369 from aminya/brew-warnings
fix: avoid already installed warnings for brew
2025-03-10 02:04:13 -07:00
Amin Ya 6eadc0b59c
Merge pull request #368 from aminya/crypto-randomuuid
fix: add polyfil for crypto.randomuuid
2025-03-10 01:34:09 -07:00
Amin Yahyaabadi 8d0a96782d fix: avoid already installed warnings for brew 2025-03-10 01:33:12 -07:00
Amin Yahyaabadi 6cb9980520 fix: add polyfil for crypto.randomuuid 2025-03-10 00:38:16 -07:00
Amin Ya 65cf4fec22
Merge pull request #367 from aminya/macos-llvm-installer
feat: install LLVM via brew on Mac if possible
2025-03-10 00:37:44 -07:00
Amin Yahyaabadi 4532f2e61b fix: force installing LLVM via bottles 2025-03-10 00:18:44 -07:00
Amin Yahyaabadi 4b9980f829 fix: add the llvm bin dir to path for brew 2025-03-10 00:16:25 -07:00
Amin Yahyaabadi eab64e395d feat: install LLVM via brew on Mac if possible 2025-03-09 15:15:31 -07:00
Amin Yahyaabadi 15f3a89bc3 feat: find brew package installation dir 2025-03-09 15:13:19 -07:00
Amin Ya c99abc9332
Merge pull request #366 from aminya/renovate/dependencies
fix(deps): update dependency @types/node to v22.13.10
2025-03-09 14:25:23 -07:00
renovate[bot] 595d13eb74
fix(deps): update dependency @types/node to v22.13.10 2025-03-09 21:25:19 +00:00
Amin Ya 799b040705
Merge pull request #364 from aminya/llvm-deps
refactor: refactor llvm install into modules
2025-03-09 14:23:45 -07:00
Amin Ya e4a5426f18
Merge pull request #359 from aminya/renovate/dependencies
fix(deps): update dependency ci-info to v4.2.0
2025-03-09 14:23:13 -07:00
renovate[bot] db6e8f43c7
fix(deps): update dependency ci-info to v4.2.0 2025-03-09 17:55:30 +00:00
Amin Yahyaabadi 935a8bc14f refactor: refactor llvm install into modules 2025-03-09 01:08:52 -08:00
Amin Ya 57e4acf400
Merge pull request #362 from aminya/git [skip ci]
feat: add git as an installable tool
2025-03-09 00:33:28 -08:00
Amin Yahyaabadi 15b21af353 fix: do not install git if already installed 2025-03-08 23:30:52 -08:00
Amin Yahyaabadi 873a0ce059 fix: add script to find the git binaries on Windows 2025-03-08 23:29:53 -08:00
Amin Yahyaabadi ae8148bb39 fix: fix the git installation path on Windows 2025-03-08 19:21:10 -08:00
Amin Yahyaabadi 43327b967b feat: add git as an installable tool 2025-03-08 00:55:16 -08:00
Amin Ya 627988e604
Merge pull request #361 from aminya/docker-multiarch
Add multi-architecture Docker images for setup-cpp
2025-03-08 00:48:41 -08:00
Amin Yahyaabadi 70694dbfc8 ci: disable provenance when pushing the images 2025-03-08 00:35:31 -08:00
Amin Yahyaabadi 8b8619681b ci: use the docker-manifest-action 2025-03-08 00:35:31 -08:00
Amin Ya 1b57bfb75c
Merge pull request #346 from aminya/renovate/pnpm-10.x
chore(deps): update pnpm to v10.6.1
2025-03-08 00:31:09 -08:00
renovate[bot] e4cc1b5646
chore(deps): update devdependencies (#360)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-08 00:27:27 -08:00
renovate[bot] 09063da084
chore(deps): update pnpm to v10.6.1 2025-03-08 08:25:33 +00:00
renovate[bot] 14d5c85db3
chore(deps): update devdependencies (#358)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-08 02:16:23 +00:00
Amin Yahyaabadi f1b09297e4 ci: skip mingw tagging on Fedora [push docker] 2025-03-07 11:25:13 -08:00
Amin Yahyaabadi 24a3400624 ci: do not use buildx [push docker] 2025-03-07 11:25:13 -08:00
Amin Yahyaabadi d28287bcdd ci: allow testing docker push on pull requests [push docker] 2025-03-07 11:25:13 -08:00
Amin Yahyaabadi ff692ffecf ci: remove from buildplatform for derived images 2025-03-07 11:25:13 -08:00
Amin Yahyaabadi 8ed3641662 ci: load the docker image after push 2025-03-07 11:25:13 -08:00
Amin Yahyaabadi 555c4d7266 ci: pull the image before tagging latest 2025-03-07 11:25:13 -08:00
Amin Yahyaabadi 65fdb2804b fix: use the image id for tagging the latest [skip test] 2025-03-07 11:25:13 -08:00
Amin Yahyaabadi e7e3464df0 fix: qualify the docker image when tagging the latest [skip test] 2025-03-07 11:25:13 -08:00
Amin Yahyaabadi 458bb0507a ci: simplify the platform suffix creation 2025-03-07 11:25:13 -08:00
Amin Yahyaabadi 0a8eedb221 ci: push multi-arch ubuntu images using docker manifest 2025-03-05 02:20:06 -08:00
Amin Yahyaabadi 380714f257 ci: ensure docker images are multi-arch 2025-03-05 01:42:32 -08:00
236 changed files with 7823 additions and 13173 deletions

View File

@ -12,6 +12,7 @@ concurrency:
env:
NODE_OPTIONS: --enable-source-maps
version: "1.8.0"
jobs:
Build:
@ -23,30 +24,32 @@ jobs:
os:
- ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.head_ref || github.ref_name }}
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: "./.nvmrc"
- name: Setup Pnpm
uses: pnpm/action-setup@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: "package.json"
- name: Install
run: |
pnpm install
bun install
- name: Build
run: |
pnpm build
pnpm build.docker-ci
bun run build
bun run build.docker-ci
- name: Lint
run: |
pnpm run test.lint
bun run test.lint
- name: Update Dist
run: |
@ -54,7 +57,7 @@ jobs:
if [[ "${{ github.ref_name }}" =~ ^refs/heads/ ]]; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add dist/
git commit -m "chore(build): update dist"
git push
@ -66,7 +69,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Dist
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
if: always()
with:
name: dist
@ -84,49 +87,65 @@ jobs:
fail-fast: false
matrix:
os:
- windows-2019
- ubuntu-20.04
- macos-13 # x64
- windows-2022
- ubuntu-22.04
- ubuntu-22.04-arm
- macos-15-intel # x64
- macos-14 # arm64
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Download Artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: dist
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: "./.nvmrc"
- name: Setup Pnpm
uses: pnpm/action-setup@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: "package.json"
- name: Cache node_modules
if: ${{ !contains(matrix.os, 'windows') }}
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.pnpm-store
D:\.pnpm-store
~/.bun
./node_modules
key: "setupcpp-node_modules-cache-OS:${{ matrix.os }}-${{ hashFiles('./.npmrc', './package.json', './.nvmrc', './pnpm-*.yaml') }}"
key: "setupcpp-node_modules-cache-OS:${{ matrix.os }}-${{ hashFiles('./.npmrc', './package.json', './.nvmrc', './bun.lock') }}"
restore-keys: |
"setupcpp-node_modules-cache-OS:${{ matrix.os }}-"
- name: Cache Turbo
uses: rharkor/caching-for-turbo@v1.8
- name: Cache .cache
uses: actions/cache@v5
with:
path: |
./.cache/eslint
./.cache/cspell
/home/runner/.cache/dprint
key: "setupcpp-cache-OS:${{ matrix.os }}-${{ hashFiles('./*.json', './.*rc', './*.yml') }}"
restore-keys: |
"setupcpp-cache-OS:${{ matrix.os }}-"
- name: Install
run: |
pnpm install
bun install
# Create self-contained executable that bundles Nodejs
- name: Create Executable
run: |
pnpm run pack.exe
bun run pack.exe
- name: Upload Executables
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: exe-${{ matrix.os }}
path: |
@ -142,49 +161,50 @@ jobs:
matrix:
os:
- windows-2022
- windows-2019
- ubuntu-24.04-arm
- ubuntu-24.04
- ubuntu-22.04-arm
- ubuntu-22.04
- ubuntu-20.04
# - ubuntu-20.04
- macos-15 # arm64
# - macos-15-large # x64
- macos-14 # arm64
# - macos-14-large # x64
- macos-15-intel # x64
# - macos-14-xlarge #arm64
- macos-13 # x64
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: true
- name: Download Dist
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: dist
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version-file: "./.nvmrc"
- name: Setup Pnpm
uses: pnpm/action-setup@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: "package.json"
- name: Cache node_modules
if: ${{ !contains(matrix.os, 'windows') }}
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
~/.pnpm-store
D:\.pnpm-store
~/.bun
./node_modules
key: "setupcpp-node_modules-cache-OS:${{ matrix.os }}-${{ hashFiles('./.npmrc', './package.json', './.nvmrc', './pnpm-*.yaml') }}"
key: "setupcpp-node_modules-cache-OS:${{ matrix.os }}-${{ hashFiles('./.npmrc', './package.json', './.nvmrc', './bun.lock') }}"
restore-keys: |
"setupcpp-node_modules-cache-OS:${{ matrix.os }}-"
- name: Install
run: |
pnpm install
bun install
# - name: Setup SSH debugging session
# uses: mxschmitt/action-tmate@v3
@ -192,12 +212,12 @@ jobs:
- name: Tests
if: ${{ !contains(github.event.head_commit.message, '[skip test]') }}
run: |
pnpm run test
bun run test
env:
RUNNER_OS_NAME: ${{ matrix.os }}
- name: Setup Node 20
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 20
@ -216,7 +236,7 @@ jobs:
- name: Setup Node 12
if: ${{ !contains(matrix.os, 'macos-14') && !contains(matrix.os, 'macos-15') }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: 12
- name: Smoke Test Legacy Bundle
@ -225,7 +245,7 @@ jobs:
node ./dist/legacy/setup-cpp.js --gcc true --cmake true
Docker:
name: Docker-${{ matrix.container.image }}-${{ matrix.platform }}
name: Docker-${{ matrix.container.image }}-${{ matrix.platform }}-${{ matrix.container.tag }}
needs: [Build]
runs-on: ${{ matrix.os }}
strategy:
@ -236,44 +256,80 @@ jobs:
platform:
- linux/amd64
container:
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04-1.1.1" }
- { distro: "fedora", image: "setup-cpp-fedora", tag: "40-1.1.1" }
- { distro: "arch", image: "setup-cpp-arch", tag: "base-1.1.1" }
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "24.04" }
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04" }
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "20.04" }
- { distro: "fedora", image: "setup-cpp-fedora", tag: "44" }
- { distro: "arch", image: "setup-cpp-arch", tag: "base" }
- { distro: "alpine", image: "setup-cpp-alpine", tag: "3.21", base_version: "22-alpine3.21" }
include:
- os: ubuntu-24.04-arm
platform: linux/arm64
container: { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04-1.1.1" }
container: { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "24.04" }
- os: ubuntu-24.04-arm
platform: linux/arm64
container: { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04" }
- os: ubuntu-24.04-arm
platform: linux/arm64
container: { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "20.04" }
- os: ubuntu-24.04-arm
platform: linux/arm64
container: { distro: "alpine", image: "setup-cpp-alpine", tag: "3.21", base_version: "22-alpine3.21" }
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: true
- name: Download Dist
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: dist
- name: Define Platform Suffix
id: platform
run: |
if [[ "${{ matrix.platform }}" == "linux/amd64" ]]; then
echo "suffix=amd64" >> $GITHUB_OUTPUT
else
echo "suffix=arm64" >> $GITHUB_OUTPUT
fi
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
if: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
with:
username: aminya
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build setup-cpp-${{matrix.container.distro }}
id: build_base
uses: docker/build-push-action@v6
with:
context: .
file: ./dev/docker/ci/${{ matrix.container.distro }}.dockerfile
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
load: true
provenance: false
platforms: ${{ matrix.platform }}
tags: aminya/${{ matrix.container.image }}:${{ matrix.container.tag }},aminya/${{ matrix.container.image }}:latest
cache-from: type=registry,ref=aminya/${{ matrix.container.image }}:latest
tags: aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
cache-from: type=registry,ref=aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
cache-to: type=inline
build-args: BASE_VERSION=${{ matrix.container.base_version || matrix.container.tag }}
- name: Tag latest locally
run: |
docker tag aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}:latest
docker tag aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}
- name: Push latest to Docker Hub
if: ${{ github.event_name != 'pull_request' && matrix.container.distro != 'ubuntu' && matrix.container.distro != 'alpine' }}
run: |
docker push aminya/${{ matrix.container.image }}:latest
docker push aminya/${{ matrix.container.image }}:${{ matrix.container.tag }}
- name: Docker Readme for setup-cpp-${{matrix.container.distro }}
if: ${{ github.event_name != 'pull_request' }}
uses: peter-evans/dockerhub-description@v4
if: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
uses: peter-evans/dockerhub-description@v5
with:
username: aminya
password: ${{ secrets.DOCKERHUB_TOKEN }}
@ -281,19 +337,35 @@ jobs:
readme-filepath: ./README_DOCKER.md
- name: Build setup-cpp-${{matrix.container.distro }}-llvm
id: build_llvm
if: ${{ matrix.container.distro != 'arch' }}
uses: docker/build-push-action@v6
with:
context: .
file: ./dev/docker/ci/${{ matrix.container.distro }}-llvm.dockerfile
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
load: true
provenance: false
platforms: ${{ matrix.platform }}
tags: aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }},aminya/${{ matrix.container.image }}-llvm:latest
cache-from: type=registry,ref=aminya/${{ matrix.container.image }}-llvm:latest
tags: aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
cache-from: type=registry,ref=aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
cache-to: type=inline
- name: Tag latest locally
if: ${{ matrix.container.distro != 'arch' }}
run: |
docker tag aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-llvm:latest
docker tag aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}
- name: Push latest to Docker Hub
if: ${{ github.event_name != 'pull_request' && matrix.container.distro != 'ubuntu' && matrix.container.distro != 'alpine' && matrix.container.distro != 'arch' }}
run: |
docker push aminya/${{ matrix.container.image }}-llvm:latest
docker push aminya/${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}
- name: Docker Readme for setup-cpp-${{matrix.container.distro }}-llvm
if: ${{ github.event_name != 'pull_request' }}
uses: peter-evans/dockerhub-description@v4
if: ${{ (github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]')) && matrix.container.distro != 'arch' }}
uses: peter-evans/dockerhub-description@v5
with:
username: aminya
password: ${{ secrets.DOCKERHUB_TOKEN }}
@ -301,29 +373,43 @@ jobs:
readme-filepath: ./README_DOCKER.md
- name: Test LLVM
if: ${{ !contains(github.event.head_commit.message, '[skip test]') }}
if: ${{ !contains(github.event.head_commit.message, '[skip test]') && matrix.container.distro != 'arch' }}
uses: docker/build-push-action@v6
with:
context: .
file: ./dev/docker/examples/${{ matrix.container.distro }}-llvm.dockerfile
push: false
platforms: ${{ matrix.platform }}
tags: aminya/test-${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}
tags: aminya/test-${{ matrix.container.image }}-llvm:${{ matrix.container.tag }}-${{ env.version }}
- name: Build setup-cpp-${{matrix.container.distro }}-gcc
id: build_gcc
uses: docker/build-push-action@v6
with:
context: .
file: ./dev/docker/ci/${{ matrix.container.distro }}-gcc.dockerfile
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
load: true
provenance: false
platforms: ${{ matrix.platform }}
tags: aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }},aminya/${{ matrix.container.image }}-gcc:latest
cache-from: type=registry,ref=aminya/${{ matrix.container.image }}-gcc:latest
tags: aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
cache-from: type=registry,ref=aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
cache-to: type=inline
- name: Tag latest locally
run: |
docker tag aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-gcc:latest
docker tag aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}
- name: Push latest to Docker Hub
if: ${{ github.event_name != 'pull_request' && matrix.container.distro != 'ubuntu' && matrix.container.distro != 'alpine' }}
run: |
docker push aminya/${{ matrix.container.image }}-gcc:latest
docker push aminya/${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}
- name: Docker Readme for setup-cpp-${{matrix.container.distro }}-gcc
if: ${{ github.event_name != 'pull_request' }}
uses: peter-evans/dockerhub-description@v4
if: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
uses: peter-evans/dockerhub-description@v5
with:
username: aminya
password: ${{ secrets.DOCKERHUB_TOKEN }}
@ -338,23 +424,37 @@ jobs:
file: ./dev/docker/examples/${{ matrix.container.distro }}-gcc.dockerfile
push: false
platforms: ${{ matrix.platform }}
tags: aminya/test-${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}
tags: aminya/test-${{ matrix.container.image }}-gcc:${{ matrix.container.tag }}-${{ env.version }}
- name: Build setup-cpp-${{matrix.container.distro }}-mingw
if: ${{ !contains(matrix.container.distro, 'fedora') }}
id: build_mingw
if: ${{ matrix.container.distro != 'fedora' && !(matrix.container.distro == 'alpine' && matrix.platform == 'linux/arm64') }}
uses: docker/build-push-action@v6
with:
context: .
file: ./dev/docker/ci/${{ matrix.container.distro }}-mingw.dockerfile
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
load: true
provenance: false
platforms: ${{ matrix.platform }}
tags: aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }},aminya/${{ matrix.container.image }}-mingw:latest
cache-from: type=registry,ref=aminya/${{ matrix.container.image }}-mingw:latest
tags: aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
cache-from: type=registry,ref=aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }}
cache-to: type=inline
- name: Tag latest locally
if: ${{ matrix.container.distro != 'fedora' && !(matrix.container.distro == 'alpine' && matrix.platform == 'linux/arm64') }}
run: |
docker tag aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-mingw:latest
docker tag aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}-${{ env.version }}-${{ steps.platform.outputs.suffix }} aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}
- name: Push latest to Docker Hub
if: ${{ github.event_name != 'pull_request' && matrix.container.distro != 'ubuntu' && matrix.container.distro != 'fedora' && matrix.container.distro != 'alpine' }}
run: |
docker push aminya/${{ matrix.container.image }}-mingw:latest
docker push aminya/${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}
- name: Docker Readme for setup-cpp-${{matrix.container.distro }}-mingw
if: ${{ github.event_name != 'pull_request' && matrix.container.distro != 'fedora' }}
uses: peter-evans/dockerhub-description@v4
if: ${{ github.event_name != 'pull_request' && matrix.container.distro != 'fedora' && !(matrix.container.distro == 'alpine' && matrix.platform == 'linux/arm64') }}
uses: peter-evans/dockerhub-description@v5
with:
username: aminya
password: ${{ secrets.DOCKERHUB_TOKEN }}
@ -362,14 +462,73 @@ jobs:
readme-filepath: ./README_DOCKER.md
- name: Test Mingw
if: ${{ !contains(github.event.head_commit.message, '[skip test]') && !contains(matrix.container.distro, 'fedora') }}
if: ${{ !contains(github.event.head_commit.message, '[skip test]') && matrix.container.distro != 'fedora' && matrix.container.distro != 'alpine' }}
uses: docker/build-push-action@v6
with:
context: .
file: ./dev/docker/examples/${{ matrix.container.distro }}-mingw.dockerfile
push: false
platforms: ${{ matrix.platform }}
tags: aminya/test-${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}
tags: aminya/test-${{ matrix.container.image }}-mingw:${{ matrix.container.tag }}-${{ env.version }}
Docker-Manifest:
needs: [Docker]
runs-on: ubuntu-24.04
if: ${{ github.event_name != 'pull_request' || contains(github.event.head_commit.message, '[push docker]') }}
strategy:
fail-fast: false
matrix:
container:
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "20.04", suffix: "", latest: false }
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "20.04", suffix: "-llvm", latest: false }
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "20.04", suffix: "-gcc", latest: false }
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "20.04", suffix: "-mingw", latest: false }
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04", suffix: "", latest: false }
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04", suffix: "-llvm", latest: false }
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04", suffix: "-gcc", latest: false }
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "22.04", suffix: "-mingw", latest: false }
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "24.04", suffix: "", latest: true }
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "24.04", suffix: "-llvm", latest: true }
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "24.04", suffix: "-gcc", latest: true }
- { distro: "ubuntu", image: "setup-cpp-ubuntu", tag: "24.04", suffix: "-mingw", latest: true }
- { distro: "alpine", image: "setup-cpp-alpine", tag: "3.21", suffix: "", latest: true }
- { distro: "alpine", image: "setup-cpp-alpine", tag: "3.21", suffix: "-llvm", latest: true }
- { distro: "alpine", image: "setup-cpp-alpine", tag: "3.21", suffix: "-gcc", latest: true }
# - { distro: "alpine", image: "setup-cpp-alpine", tag: "3.21", suffix: "-mingw", latest: true }
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: aminya
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: Noelware/docker-manifest-action@0.4.3
with:
inputs: aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}-${{ env.version }}
images: aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}-${{ env.version }}-amd64,aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}-${{ env.version }}-arm64
push: true
amend: true
- uses: Noelware/docker-manifest-action@0.4.3
with:
inputs: aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}
images: aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}-${{ env.version }}-amd64,aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}-${{ env.version }}-arm64
push: true
amend: true
- uses: Noelware/docker-manifest-action@0.4.3
if: ${{ matrix.container.latest }}
with:
inputs: aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:latest
images: aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}-${{ env.version }}-amd64,aminya/${{ matrix.container.image }}${{ matrix.container.suffix }}:${{ matrix.container.tag }}-${{ env.version }}-arm64
push: true
amend: true
Release:
if: startsWith(github.ref, 'refs/tags/')
@ -377,7 +536,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Download Executables
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
pattern: exe-*
path: ./exe/
@ -389,7 +548,7 @@ jobs:
chmod +x -R ./exe/
- name: Download Dist
uses: actions/download-artifact@v4
uses: actions/download-artifact@v7
with:
name: dist
path: dist/

2
.gitignore vendored
View File

@ -24,3 +24,5 @@ coverage
/src/llvm/assets/
/build
dist/library
*.tgz

24
.npmignore Normal file
View File

@ -0,0 +1,24 @@
.DS_Store
Thumbs.db
**/node_modules
**/temp-*
**/tsconfig.tsbuildinfo
.parcel-cache
**/exe/
**/log
**/exe
**/cache
**/.cache
**/coverage
**/.turbo
src/llvm/assets/
**/build
**/__tests__
**/dev/cpp_vcpkg_project
**/packages/*/dist/
**/*.tgz
**/.eslintrc.json
**/jest.config.mjs
.vscode/
.github/
biome.jsonc

2
.nvmrc
View File

@ -1 +1 @@
22.14.0
22.22.0

View File

@ -1,11 +0,0 @@
import { buildTerserOptions } from "terser-config-atomic/dist/builder.js"
const config = buildTerserOptions(process.env.NODE_ENV, undefined, true)
if (
typeof config.compress === "object"
&& "unsafe_math" in config.compress
) {
config.compress.unsafe_math = false
}
export default config

View File

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.21...3.28)
project(
setup_cpp_tests
VERSION 1.1.1
VERSION 1.8.0
DESCRIPTION "Tests for setup-cpp"
HOMEPAGE_URL "https://github.com/aminya/setup-cpp"
LANGUAGES CXX C)

View File

@ -1,9 +1,9 @@
# Contributing
You will need [`pnpm`](https://pnpm.io/installation) to build and test `setup-cpp`:
You will need [`bun`](https://bun.com/) to build and test `setup-cpp`:
```shell
pnpm install
bun install
```
To avoid permenant changes to your system, you can use the test docker images under `./dev/docker/__tests__`.

147
README.md
View File

@ -31,12 +31,12 @@ Setting up a **cross-platform** environment for building and testing C++/C proje
| --------------- | ----------------------------------------------------------------------------------------------------------- |
| compiler | llvm, gcc, msvc, apple-clang, vcvarsall |
| build system | cmake, ninja, meson, make, task, bazel |
| package manager | vcpkg, conan, choco, brew, nala, setup-cpp |
| package manager | vcpkg, conan, choco, brew, apt-fast, nala, git, setup-cpp |
| analyzer/linter | clang-tidy, clang-format, cppcheck, cpplint, flawfinder, lizard, infer, cmakelang, cmake-format, cmake-lint |
| cache | ccache, sccache |
| documentation | doxygen, graphviz |
| coverage | gcovr, opencppcoverage, kcov |
| other | python, powershell, sevenzip |
| other | python, powershell, sevenzip, tar |
`setup-cpp` automatically handles the dependencies of the selected tool (e.g., `python` is required for `conan`).
@ -70,23 +70,19 @@ NOTE: setup-cpp requires Nodejs 12 or higher. If Nodejs shipped with your distri
#### With executable
Download the executable for your platform from [here](https://github.com/aminya/setup-cpp/releases/tag/v1.1.1), and run it with the available options. You can also automate downloading using `curl`, or other similar tools.
Download the executable for your platform from [here](https://github.com/aminya/setup-cpp/releases/tag/v1.8.0), and run it with the available options. You can also automate downloading using `curl`, or other similar tools.
```shell
# windows x64
curl -o ./setup-cpp.exe -LJ "https://github.com/aminya/setup-cpp/releases/download/v1.1.1/setup-cpp-x64-windows.exe"
curl -o ./setup-cpp.exe -LJ "https://github.com/aminya/setup-cpp/releases/download/v1.8.0/setup-cpp-x64-windows.exe"
# linux x64
curl -o ./setup-cpp -LJ "https://github.com/aminya/setup-cpp/releases/download/v1.1.1/setup-cpp-x64-linux"
chmod +x ./setup-cpp
curl -o ./setup-cpp -LJ "https://github.com/aminya/setup-cpp/releases/download/v1.8.0/setup-cpp-x64-linux"
# linux arm64
curl -o ./setup-cpp -LJ "https://github.com/aminya/setup-cpp/releases/download/v1.8.0/setup-cpp-arm64-linux"
# macos arm64
curl -o ./setup-cpp -LJ "https://github.com/aminya/setup-cpp/releases/download/v1.1.1/setup-cpp-arm64-macos"
chmod +x ./setup-cpp
curl -o ./setup-cpp -LJ "https://github.com/aminya/setup-cpp/releases/download/v1.8.0/setup-cpp-arm64-macos"
# macos x64
curl -o ./setup-cpp -LJ "https://github.com/aminya/setup-cpp/releases/download/v1.1.1/setup-cpp-x64-macos"
chmod +x ./setup-cpp
curl -o ./setup-cpp -LJ "https://github.com/aminya/setup-cpp/releases/download/v1.8.0/setup-cpp-x64-macos"
```
An example that installs llvm, cmake, ninja, ccache, and vcpkg:
@ -99,6 +95,7 @@ An example that installs llvm, cmake, ninja, ccache, and vcpkg:
```shell
# linux/macos example
chmod +x ./setup-cpp
sudo ./setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
source ~/.cpprc # activate cpp environment variables
```
@ -212,90 +209,145 @@ When using the `setup-cpp` action in GitHub Actions, by default it will also ins
To provide fast development environments, `setup-cpp` provides several prebuilt docker images that have the tools you need. You can use these images as a base image for your project.
The names are in the format `aminya/setup-cpp-<platform>:<platform_version>-<setup_cpp_version>` and `aminya/setup-cpp-<platform>-<compiler>:<platform_version>-<setup_cpp_version>`.
The tags are in the following template:
#### Ubuntu Images
- Base image: `aminya/setup-cpp-ubuntu:24.04`
- Compiler image: `aminya/setup-cpp-ubuntu-llvm:24.04`
- Base image with pinned setup-cpp version: `aminya/setup-cpp-ubuntu:24.04-v1.8.0`
- Compiler image with pinned setup-cpp version: `aminya/setup-cpp-ubuntu-llvm:24.04-v1.8.0`
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang`
The supported platforms are `ubuntu`, `alpine`, `fedora`, and `arch`. The supported compilers are `llvm`, `gcc`, and `mingw`.
#### Ubuntu Images (amd64 and arm64)
Setup-cpp provides prebuilt images for various Ubuntu versions (20.04, 22.04, 24.04) with support for base tools, and compilers `llvm`, `gcc`, and `mingw` available for `amd64` and `arm64` architectures.
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang` for Ubuntu 24.04:
```dockerfile
FROM aminya/setup-cpp-ubuntu:22.04-1.1.1 AS builder
FROM aminya/setup-cpp-ubuntu:24.04 AS builder
```
Image with `llvm` and the base tools:
```dockerfile
FROM aminya/setup-cpp-ubuntu-llvm:22.04-1.1.1 AS builder
FROM aminya/setup-cpp-ubuntu-llvm:24.04 AS builder
```
Image with `gcc` and the base tools:
```dockerfile
FROM aminya/setup-cpp-ubuntu-gcc:22.04-1.1.1 AS builder
FROM aminya/setup-cpp-ubuntu-gcc:24.04 AS builder
```
Image with `mingw` and the base tools:
```dockerfile
FROM aminya/setup-cpp-ubuntu-mingw:22.04-1.1.1 AS builder
FROM aminya/setup-cpp-ubuntu-mingw:24.04 AS builder
```
#### Fedora Images
There are also the variants for Ubuntu `22.04`
```dockerfile
FROM aminya/setup-cpp-ubuntu:22.04 AS builder
FROM aminya/setup-cpp-ubuntu-llvm:22.04 AS builder
FROM aminya/setup-cpp-ubuntu-gcc:22.04 AS builder
FROM aminya/setup-cpp-ubuntu-mingw:22.04 AS builder
```
And for Ubuntu `20.04`:
```dockerfile
FROM aminya/setup-cpp-ubuntu:20.04 AS builder
FROM aminya/setup-cpp-ubuntu-llvm:20.04 AS builder
FROM aminya/setup-cpp-ubuntu-gcc:20.04 AS builder
FROM aminya/setup-cpp-ubuntu-mingw:20.04 AS builder
```
#### Alpine Images (amd64 and arm64)
Setup-cpp provides prebuilt images for Alpine with support for base tools, and compilers `llvm`, `gcc`, and `mingw` available for `amd64` and `arm64` architectures.
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang` for Alpine 3.18:
```dockerfile
FROM aminya/setup-cpp-alpine:3.21 AS builder
```
Image with `llvm` and the base tools:
```dockerfile
FROM aminya/setup-cpp-alpine-llvm:3.21 AS builder
```
Image with `gcc` and the base tools:
```dockerfile
FROM aminya/setup-cpp-alpine-gcc:3.21 AS builder
```
Image with `mingw` and the base tools:
```dockerfile
FROM aminya/setup-cpp-alpine-mingw:3.21 AS builder
```
#### Fedora Images (amd64)
<details>
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang`
```dockerfile
FROM aminya/setup-cpp-fedora:40-1.1.1 AS builder
FROM aminya/setup-cpp-fedora:40 AS builder
```
Image with `llvm` and the base tools:
```dockerfile
FROM aminya/setup-cpp-fedora-llvm:40-1.1.1 AS builder
FROM aminya/setup-cpp-fedora-llvm:40 AS builder
```
Image with `gcc` and the base tools:
```dockerfile
FROM aminya/setup-cpp-fedora-gcc:40-1.1.1 AS builder
FROM aminya/setup-cpp-fedora-gcc:40 AS builder
```
Image with `mingw` and the base tools:
```dockerfile
FROM aminya/setup-cpp-fedora-mingw:40-1.1.1 AS builder
FROM aminya/setup-cpp-fedora-mingw:40 AS builder
```
</details>
#### ArchLinux Images
#### ArchLinux Images (amd64)
<details>
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang`
```dockerfile
FROM aminya/setup-cpp-arch:base-1.1.1 AS builder
FROM aminya/setup-cpp-arch:base AS builder
```
Image with `llvm` and the base tools:
```dockerfile
FROM aminya/setup-cpp-arch-llvm:base-1.1.1 AS builder
FROM aminya/setup-cpp-arch-llvm:base AS builder
```
Image with `gcc` and the base tools:
```dockerfile
FROM aminya/setup-cpp-arch-gcc:base-1.1.1 AS builder
FROM aminya/setup-cpp-arch-gcc:base AS builder
```
Image with `mingw` and the base tools:
```dockerfile
FROM aminya/setup-cpp-arch-mingw:base-1.1.1 AS builder
FROM aminya/setup-cpp-arch-mingw:base AS builder
```
</details>
@ -314,7 +366,7 @@ RUN apt-get update -qq && \
# install nodejs
apt-get install -y --no-install-recommends nodejs npm && \
# install setup-cpp
npm install -g setup-cpp@v1.1.1 && \
npm install -g setup-cpp@v1.8.0 && \
# install the compiler and tools
NODE_OPTIONS="--enable-source-maps" \
setup-cpp \
@ -424,7 +476,7 @@ stages:
apt-get install -y --no-install-recommends nodejs npm
# install setup-cpp
npm install -g setup-cpp@v1.1.1
npm install -g setup-cpp@v1.8.0
# install the compiler and tools
./setup-cpp-x64-linux --compiler $compiler --cmake true --ninja true --ccache true --vcpkg true
@ -453,6 +505,37 @@ test_linux_gcc:
- *test
```
### As a Library in Nodejs
```ts
import { setupCpp, success, error } from "setup-cpp"
async function main() {
const { errorMessages, successMessages } = await setupCpp({
compiler: "llvm",
cmake: true,
ninja: true,
vcpkg: true,
})
for (const message of errorMessages) {
error(message)
}
for (const message of successMessages) {
success(message)
}
if (errorMessages.length !== 0) {
process.exit(1)
}
}
main().catch(err => {
console.error(err)
process.exit(1)
})
```
## Articles
[Setup-Cpp on Dev.to](https://dev.to/aminya/setup-cpp-3ia4)

View File

@ -16,82 +16,145 @@ See https://github.com/aminya/setup-cpp for more information about using `setup-
To provide fast development environments, `setup-cpp` provides several prebuilt docker images that have the tools you need. You can use these images as a base image for your project.
The names are in the format `aminya/setup-cpp-<platform>:<platform_version>-<setup_cpp_version>` and `aminya/setup-cpp-<platform>-<compiler>:<platform_version>-<setup_cpp_version>`.
The tags are in the following template:
#### Ubuntu Images
- Base image: `aminya/setup-cpp-ubuntu:24.04`
- Compiler image: `aminya/setup-cpp-ubuntu-llvm:24.04`
- Base image with pinned setup-cpp version: `aminya/setup-cpp-ubuntu:24.04-v1.8.0`
- Compiler image with pinned setup-cpp version: `aminya/setup-cpp-ubuntu-llvm:24.04-v1.8.0`
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang`
The supported platforms are `ubuntu`, `alpine`, `fedora`, and `arch`. The supported compilers are `llvm`, `gcc`, and `mingw`.
#### Ubuntu Images (amd64 and arm64)
Setup-cpp provides prebuilt images for various Ubuntu versions (20.04, 22.04, 24.04) with support for base tools, and compilers `llvm`, `gcc`, and `mingw` available for `amd64` and `arm64` architectures.
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang` for Ubuntu 24.04:
```dockerfile
FROM aminya/setup-cpp-ubuntu:22.04-1.1.1 AS builder
FROM aminya/setup-cpp-ubuntu:24.04 AS builder
```
Image with `llvm` and the base tools:
```dockerfile
FROM aminya/setup-cpp-ubuntu-llvm:22.04-1.1.1 AS builder
FROM aminya/setup-cpp-ubuntu-llvm:24.04 AS builder
```
Image with `gcc` and the base tools:
```dockerfile
FROM aminya/setup-cpp-ubuntu-gcc:22.04-1.1.1 AS builder
FROM aminya/setup-cpp-ubuntu-gcc:24.04 AS builder
```
Image with `mingw` and the base tools:
```dockerfile
FROM aminya/setup-cpp-ubuntu-mingw:22.04-1.1.1 AS builder
FROM aminya/setup-cpp-ubuntu-mingw:24.04 AS builder
```
#### Fedora Images
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang`
There are also the variants for Ubuntu `22.04`
```dockerfile
FROM aminya/setup-cpp-fedora:40-1.1.1 AS builder
FROM aminya/setup-cpp-ubuntu:22.04 AS builder
FROM aminya/setup-cpp-ubuntu-llvm:22.04 AS builder
FROM aminya/setup-cpp-ubuntu-gcc:22.04 AS builder
FROM aminya/setup-cpp-ubuntu-mingw:22.04 AS builder
```
And for Ubuntu `20.04`:
```dockerfile
FROM aminya/setup-cpp-ubuntu:20.04 AS builder
FROM aminya/setup-cpp-ubuntu-llvm:20.04 AS builder
FROM aminya/setup-cpp-ubuntu-gcc:20.04 AS builder
FROM aminya/setup-cpp-ubuntu-mingw:20.04 AS builder
```
#### Alpine Images (amd64 and arm64)
Setup-cpp provides prebuilt images for Alpine with support for base tools, and compilers `llvm`, `gcc`, and `mingw` available for `amd64` and `arm64` architectures.
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang` for Alpine 3.18:
```dockerfile
FROM aminya/setup-cpp-alpine:3.21 AS builder
```
Image with `llvm` and the base tools:
```dockerfile
FROM aminya/setup-cpp-fedora-llvm:40-1.1.1 AS builder
FROM aminya/setup-cpp-alpine-llvm:3.21 AS builder
```
Image with `gcc` and the base tools:
```dockerfile
FROM aminya/setup-cpp-fedora-gcc:40-1.1.1 AS builder
FROM aminya/setup-cpp-alpine-gcc:3.21 AS builder
```
Image with `mingw` and the base tools:
```dockerfile
FROM aminya/setup-cpp-fedora-mingw:40-1.1.1 AS builder
FROM aminya/setup-cpp-alpine-mingw:3.21 AS builder
```
#### ArchLinux Images
#### Fedora Images (amd64)
<details>
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang`
```dockerfile
FROM aminya/setup-cpp-arch:base-1.1.1 AS builder
FROM aminya/setup-cpp-fedora:40 AS builder
```
Image with `llvm` and the base tools:
```dockerfile
FROM aminya/setup-cpp-arch-llvm:base-1.1.1 AS builder
FROM aminya/setup-cpp-fedora-llvm:40 AS builder
```
Image with `gcc` and the base tools:
```dockerfile
FROM aminya/setup-cpp-arch-gcc:base-1.1.1 AS builder
FROM aminya/setup-cpp-fedora-gcc:40 AS builder
```
Image with `mingw` and the base tools:
```dockerfile
FROM aminya/setup-cpp-arch-mingw:base-1.1.1 AS builder
FROM aminya/setup-cpp-fedora-mingw:40 AS builder
```
</details>
#### ArchLinux Images (amd64)
<details>
Base image with `cmake, ninja, task, vcpkg, python, make, cppcheck, gcovr, doxygen, ccache, conan, meson, cmakelang`
```dockerfile
FROM aminya/setup-cpp-arch:base AS builder
```
Image with `llvm` and the base tools:
```dockerfile
FROM aminya/setup-cpp-arch-llvm:base AS builder
```
Image with `gcc` and the base tools:
```dockerfile
FROM aminya/setup-cpp-arch-gcc:base AS builder
```
Image with `mingw` and the base tools:
```dockerfile
FROM aminya/setup-cpp-arch-mingw:base AS builder
```
</details>

View File

@ -163,6 +163,12 @@ inputs:
node-package-manager:
description: "The node package manager to use (npm/yarn/pnpm) when installing setup-cpp globally"
required: false
git:
description: "Wether to install git (true/false) or the specific version to install."
required: false
tar:
description: "Wether to install tar (true/false) or the specific version to install."
required: false
runs:
using: "node20"

View File

@ -1,5 +1,5 @@
import type { TransformOptions } from "@babel/core"
// @ts-ignore
// @ts-expect-error no types
import RemoveNodePrefix from "@upleveled/babel-plugin-remove-node-prefix"
const babelConfig: TransformOptions = {

3724
bun.lock Normal file

File diff suppressed because it is too large Load Diff

2
bunfig.toml Normal file
View File

@ -0,0 +1,2 @@
[install]
linker = "hoisted"

View File

@ -31,6 +31,8 @@ words:
- clangd
- cmake
- cmakeformat
- cmakelang
- cmakelint
- cobertura
- copr
- CPATH
@ -48,6 +50,7 @@ words:
- dyld
- eabi
- envosman
- envosmanrc
- esac
- esbuild
- esmodule
@ -57,11 +60,13 @@ words:
- gcovr
- ghes
- Graphviz
- gtar
- hadolint
- iarna
- inja
- isci
- isroot
- jsonify
- kcov
- LDFLAGS
- lefticus
@ -71,6 +76,7 @@ words:
- libstdc
- libtinfo
- liuli
- llvmorg
- mdimporterdir
- memoizee
- mkdirp
@ -100,6 +106,7 @@ words:
- pygments
- pypy
- qlplugindir
- rharkor
- Sccache
- setupcpp
- setx

View File

@ -0,0 +1,10 @@
FROM aminya/setup-cpp-alpine:latest AS setup-cpp-alpine-gcc
# install gcc
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler gcc && \
# cleanup
rm -rf /var/cache/apk/*
SHELL ["/entrypoint.sh", "/bin/sh", "-c"]
ENTRYPOINT ["/entrypoint.sh", "/bin/sh"]

View File

@ -0,0 +1,10 @@
FROM aminya/setup-cpp-alpine:latest AS setup-cpp-alpine-llvm
# install llvm
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler llvm && \
# cleanup
rm -rf /var/cache/apk/*
SHELL ["/entrypoint.sh", "/bin/sh", "-c"]
ENTRYPOINT ["/entrypoint.sh", "/bin/sh"]

View File

@ -0,0 +1,11 @@
FROM aminya/setup-cpp-alpine:latest AS setup-cpp-alpine-mingw
# install mingw/powershell
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler mingw \
--powershell true && \
# cleanup
rm -rf /var/cache/apk/*
SHELL ["/entrypoint.sh", "/bin/sh", "-c"]
ENTRYPOINT ["/entrypoint.sh", "/bin/sh"]

View File

@ -0,0 +1,34 @@
ARG BASE_VERSION=22-alpine3.21
#### Base Image with Node.js
FROM --platform=$BUILDPLATFORM node:${BASE_VERSION} AS alpine-nodejs
#### Base Image with Tools
FROM alpine-nodejs AS setup-cpp-alpine
COPY "./dist/modern" "/usr/lib/setup-cpp/"
# install the cpp tools
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--cmake true \
--ninja true \
--task true \
--python true \
--make true \
--cppcheck true \
--gcovr true \
--doxygen true \
--vcpkg true \
--ccache true \
--conan true \
--cmakelang true \
--meson true && \
# cleanup
rm -rf /var/cache/apk/*
# Custom entrypoint due to bash -l limitations on Alpine
RUN printf '#!/bin/bash\nsource $HOME/.cpprc\nexec "$@"\n' > /entrypoint.sh && \
chmod +x /entrypoint.sh
SHELL ["/entrypoint.sh", "/bin/sh", "-c"]
ENTRYPOINT ["/entrypoint.sh", "/bin/sh"]

View File

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-arch:latest AS setup-cpp-arch-gcc
FROM aminya/setup-cpp-arch:latest AS setup-cpp-arch-gcc
# install llvm
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \

View File

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-arch:latest AS setup-cpp-arch-llvm
FROM aminya/setup-cpp-arch:latest AS setup-cpp-arch-llvm
# install llvm
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \

View File

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-arch:latest AS setup-cpp-arch-mingw
FROM aminya/setup-cpp-arch:latest AS setup-cpp-arch-mingw
# install mingw/powershell
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \

View File

@ -13,7 +13,7 @@ RUN pacman -Syuu --noconfirm && \
rm -rf /var/cache/pacman/pkg/* && \
rm -rf /tmp/*
FROM --platform=$BUILDPLATFORM arch-nodejs AS setup-cpp-arch
FROM arch-nodejs AS setup-cpp-arch
COPY "./dist/modern" "/usr/lib/setup-cpp/"

View File

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-fedora:latest AS setup-cpp-fedora-gcc
FROM aminya/setup-cpp-fedora:latest AS setup-cpp-fedora-gcc
# install gcc
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \

View File

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-fedora:latest AS setup-cpp-fedora-llvm
FROM aminya/setup-cpp-fedora:latest AS setup-cpp-fedora-llvm
# install llvm
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \

View File

@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-fedora:latest AS setup-cpp-fedora-mingw
FROM aminya/setup-cpp-fedora:latest AS setup-cpp-fedora-mingw
# install mingw
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \

View File

@ -1,5 +1,5 @@
## base image
FROM --platform=$BUILDPLATFORM fedora:40 AS fedora-nodejs
FROM --platform=$BUILDPLATFORM fedora:44 AS fedora-nodejs
# install nodejs
RUN dnf -y install nodejs npm && \
@ -7,7 +7,7 @@ RUN dnf -y install nodejs npm && \
dnf clean all && \
rm -rf /tmp/*
FROM --platform=$BUILDPLATFORM fedora-nodejs AS setup-cpp-fedora
FROM fedora-nodejs AS setup-cpp-fedora
COPY "./dist/modern" "/usr/lib/setup-cpp/"

View File

@ -1,13 +1,11 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-ubuntu:latest AS setup-cpp-ubuntu-gcc
FROM aminya/setup-cpp-ubuntu:latest AS setup-cpp-ubuntu-gcc
# install gcc
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler gcc && \
# cleanup
nala autoremove -y && \
nala autopurge -y && \
apt-get clean && \
nala clean --lists && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/*

View File

@ -1,13 +1,11 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-ubuntu:latest AS setup-cpp-ubuntu-llvm
FROM aminya/setup-cpp-ubuntu:latest AS setup-cpp-ubuntu-llvm
# install llvm
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler llvm && \
# cleanup
nala autoremove -y && \
nala autopurge -y && \
apt-get clean && \
nala clean --lists && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/*

View File

@ -1,14 +1,12 @@
FROM --platform=$BUILDPLATFORM aminya/setup-cpp-ubuntu:latest AS setup-cpp-ubuntu-mingw
FROM aminya/setup-cpp-ubuntu:latest AS setup-cpp-ubuntu-mingw
# install mingw/powershell
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--compiler mingw \
--powershell true && \
# cleanup
nala autoremove -y && \
nala autopurge -y && \
apt-get clean && \
nala clean --lists && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/*

View File

@ -1,12 +1,14 @@
ARG BASE_VERSION=22.04
#### Base Image with Node.js
FROM --platform=$BUILDPLATFORM ubuntu:22.04 AS ubuntu-nodejs
FROM --platform=$BUILDPLATFORM ubuntu:${BASE_VERSION} AS ubuntu-nodejs
# install latest nodejs
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update -qq && \
apt-get install -y --no-install-recommends nodejs && \
# cleanup
@ -15,13 +17,13 @@ RUN apt-get update -qq && \
rm -rf /tmp/*
#### Base Image with Tools
FROM --platform=$BUILDPLATFORM ubuntu-nodejs AS setup-cpp-ubuntu
FROM ubuntu-nodejs AS setup-cpp-ubuntu
COPY "./dist/modern" "/usr/lib/setup-cpp/"
# install the cpp tools
RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--nala true \
--apt-fast true \
--cmake true \
--ninja true \
--task true \
@ -36,10 +38,8 @@ RUN node --enable-source-maps /usr/lib/setup-cpp/setup-cpp.mjs \
--cmakelang true \
--meson true && \
# cleanup
nala autoremove -y && \
nala autopurge -y && \
apt-get clean && \
nala clean --lists && \
apt-get clean autoclean && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/*

View File

@ -0,0 +1,15 @@
#### Building (example)
FROM aminya/setup-cpp-alpine-gcc AS builder
COPY ./dev/cpp_vcpkg_project /home/app
WORKDIR /home/app
RUN task build
#### Running environment
# use a fresh image as the runner
FROM alpine:3.21 AS runner
# copy the built binaries and their runtime dependencies
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
WORKDIR /home/app/
ENTRYPOINT ["./my_exe"]

View File

@ -0,0 +1,15 @@
#### Building (example)
FROM aminya/setup-cpp-alpine-llvm AS builder
COPY ./dev/cpp_vcpkg_project /home/app
WORKDIR /home/app
RUN task build
#### Running environment
# use a fresh image as the runner
FROM alpine:3.21 AS runner
# copy the built binaries and their runtime dependencies
COPY --from=builder /home/app/build/my_exe/Release/ /home/app/
WORKDIR /home/app/
ENTRYPOINT ["./my_exe"]

View File

@ -0,0 +1,7 @@
#### Cross Building (example)
FROM aminya/setup-cpp-alpine-mingw AS builder-mingw
COPY ./dev/cpp_vcpkg_project /home/app
WORKDIR /home/app
RUN bash -c 'source ~/.cpprc \
&& task build_cross_mingw'

View File

@ -1,5 +1,5 @@
## base image
FROM fedora:40 AS setup-cpp-fedora
FROM fedora:44 AS setup-cpp-fedora
# install nodejs
RUN dnf -y install nodejs npm && \

View File

@ -1,5 +1,5 @@
## base image
FROM fedora:40 AS setup-cpp-fedora-mingw
FROM fedora:44 AS setup-cpp-fedora-mingw
# install nodejs
RUN dnf -y install nodejs npm && \

View File

@ -7,7 +7,7 @@ RUN apt-get update -qq && \
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update -qq && \
apt-get install -y --no-install-recommends nodejs && \
# install setup-cpp

View File

@ -6,7 +6,7 @@ RUN apt-get update -qq && \
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update -qq && \
apt-get install -y --no-install-recommends nodejs && \
# install setup-cpp

View File

@ -6,7 +6,7 @@ RUN apt-get update -qq && \
apt-get install -y --no-install-recommends curl gnupg ca-certificates && \
mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt-get update -qq && \
apt-get install -y --no-install-recommends nodejs && \
# install setup-cpp

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
dist/legacy/assets/index-DsNLw0ut.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -143,5 +143,5 @@ if [[ "${VERSION_CODENAME}" == "bookworm" ]]; then
add-apt-repository -y "${REPO_NAME}"
fi
add-apt-repository -y --no-update --remove "${REPO_NAME}"
add-apt-repository -y --remove "${REPO_NAME}"
apt-get update

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"ninja":"1.12.1","cmake":"3.31.4","task":"3.40.1","powershell":"7.4.5","pip":">=22.2.0","python":">=3.7.9","meson":{"linux":{"ubuntu":{"20":"1.6.1","18":"0.61.4","else":"0.61.4"},"else":"1.6.1"},"else":"1.6.1"},"kcov":{"linux":{"ubuntu":{"22":"42-binary","20":"40-binary","14":"40","else":"42"},"else":"42"},"else":"42"},"doxygen":{"linux":{"archlinux":"1.12.0-2","ubuntu":{"22":"1.12.0","18":"1.10.0","else":"1.10.0"},"else":"1.12.0"},"else":"1.12.0"},"gcc":{"win32":"14.2.0posix-18.1.8-12.0.0-ucrt-r1","else":""},"mingw":{"win32":"14.2.0posix-18.1.8-12.0.0-ucrt-r1","else":""},"gcovr":{"linux":{"ubuntu":{"20":"","18":"5.0","else":"5.0"},"else":""},"else":""},"nala":{"linux":{"ubuntu":{"22":"","21":"legacy","else":"legacy"},"else":""},"else":""},"llvm":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang++":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang-tidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clangtidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang-format":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clangformat":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"}}
{"ninja":"1.13.2","cmake":"3.31.10","task":"3.46.4","powershell":"7.5.1","pip":">=22.2.0","python":">=3.7.9","meson":{"linux":{"ubuntu":{"20":"1.10.0","18":"0.61.4","else":"0.61.4"},"else":"1.10.0"},"else":"1.10.0"},"kcov":{"linux":{"ubuntu":{"22":"42-binary","20":"40-binary","14":"40","else":"42"},"else":"42"},"else":"42"},"doxygen":{"linux":{"archlinux":"1.15.0-2","ubuntu":{"22":"","18":"1.10.0","else":"1.10.0"},"else":""},"else":"1.15.0"},"tar":{"win32":"1.13-1","else":""},"gcc":{"win32":"15.2.0posix-13.0.0-ucrt-r5","else":""},"mingw":{"win32":"15.2.0posix-13.0.0-ucrt-r5","else":""},"gcovr":{"linux":{"ubuntu":{"20":"","18":"5.0","else":"5.0"},"else":""},"else":""},"nala":{"linux":{"ubuntu":{"22":"","21":"legacy","else":"legacy"},"else":""},"else":""},"llvm":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"20.1.8"}}},"linux":{"alpine":{"else":{"else":"19.1.7"}},"else":"20.1.8"},"else":"20.1.8"},"clang":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"20.1.8"}}},"linux":{"alpine":{"else":{"else":"19.1.7"}},"else":"20.1.8"},"else":"20.1.8"},"clang++":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"20.1.8"}}},"linux":{"alpine":{"else":{"else":"19.1.7"}},"else":"20.1.8"},"else":"20.1.8"},"clang-tidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"20.1.8"}}},"linux":{"alpine":{"else":{"else":"19.1.7"}},"else":"20.1.8"},"else":"20.1.8"},"clangtidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"20.1.8"}}},"linux":{"alpine":{"else":{"else":"19.1.7"}},"else":"20.1.8"},"else":"20.1.8"},"clang-format":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"20.1.8"}}},"linux":{"alpine":{"else":{"else":"19.1.7"}},"else":"20.1.8"},"else":"20.1.8"},"clangformat":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"20.1.8"}}},"linux":{"alpine":{"else":{"else":"19.1.7"}},"else":"20.1.8"},"else":"20.1.8"}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
dist/modern/assets/index-DDkfbFPw.mjs vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -143,5 +143,5 @@ if [[ "${VERSION_CODENAME}" == "bookworm" ]]; then
add-apt-repository -y "${REPO_NAME}"
fi
add-apt-repository -y --no-update --remove "${REPO_NAME}"
add-apt-repository -y --remove "${REPO_NAME}"
apt-get update

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"ninja":"1.12.1","cmake":"3.31.4","task":"3.40.1","powershell":"7.4.5","pip":">=22.2.0","python":">=3.7.9","meson":{"linux":{"ubuntu":{"20":"1.6.1","18":"0.61.4","else":"0.61.4"},"else":"1.6.1"},"else":"1.6.1"},"kcov":{"linux":{"ubuntu":{"22":"42-binary","20":"40-binary","14":"40","else":"42"},"else":"42"},"else":"42"},"doxygen":{"linux":{"archlinux":"1.12.0-2","ubuntu":{"22":"1.12.0","18":"1.10.0","else":"1.10.0"},"else":"1.12.0"},"else":"1.12.0"},"gcc":{"win32":"14.2.0posix-18.1.8-12.0.0-ucrt-r1","else":""},"mingw":{"win32":"14.2.0posix-18.1.8-12.0.0-ucrt-r1","else":""},"gcovr":{"linux":{"ubuntu":{"20":"","18":"5.0","else":"5.0"},"else":""},"else":""},"nala":{"linux":{"ubuntu":{"22":"","21":"legacy","else":"legacy"},"else":""},"else":""},"llvm":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang++":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang-tidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clangtidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clang-format":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"},"clangformat":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"18.1.8"}}},"else":"19.1.6"}}
{"ninja":"1.13.2","cmake":"3.31.10","task":"3.46.4","powershell":"7.5.1","pip":">=22.2.0","python":">=3.7.9","meson":{"linux":{"ubuntu":{"20":"1.10.0","18":"0.61.4","else":"0.61.4"},"else":"1.10.0"},"else":"1.10.0"},"kcov":{"linux":{"ubuntu":{"22":"42-binary","20":"40-binary","14":"40","else":"42"},"else":"42"},"else":"42"},"doxygen":{"linux":{"archlinux":"1.15.0-2","ubuntu":{"22":"","18":"1.10.0","else":"1.10.0"},"else":""},"else":"1.15.0"},"tar":{"win32":"1.13-1","else":""},"gcc":{"win32":"15.2.0posix-13.0.0-ucrt-r5","else":""},"mingw":{"win32":"15.2.0posix-13.0.0-ucrt-r5","else":""},"gcovr":{"linux":{"ubuntu":{"20":"","18":"5.0","else":"5.0"},"else":""},"else":""},"nala":{"linux":{"ubuntu":{"22":"","21":"legacy","else":"legacy"},"else":""},"else":""},"llvm":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"20.1.8"}}},"linux":{"alpine":{"else":{"else":"19.1.7"}},"else":"20.1.8"},"else":"20.1.8"},"clang":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"20.1.8"}}},"linux":{"alpine":{"else":{"else":"19.1.7"}},"else":"20.1.8"},"else":"20.1.8"},"clang++":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"20.1.8"}}},"linux":{"alpine":{"else":{"else":"19.1.7"}},"else":"20.1.8"},"else":"20.1.8"},"clang-tidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"20.1.8"}}},"linux":{"alpine":{"else":{"else":"19.1.7"}},"else":"20.1.8"},"else":"20.1.8"},"clangtidy":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"20.1.8"}}},"linux":{"alpine":{"else":{"else":"19.1.7"}},"else":"20.1.8"},"else":"20.1.8"},"clang-format":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"20.1.8"}}},"linux":{"alpine":{"else":{"else":"19.1.7"}},"else":"20.1.8"},"else":"20.1.8"},"clangformat":{"darwin":{"else":{"else":{"x64":"15.0.7","else":"20.1.8"}}},"linux":{"alpine":{"else":{"else":"19.1.7"}},"else":"20.1.8"},"else":"20.1.8"}}

View File

@ -2,6 +2,6 @@ pre-commit:
parallel: false
commands:
test.lint:
run: pnpm run test.lint
run: bun run test.lint
build:
run: pnpm run clean && pnpm run build -- --no-color && git add ./dist
run: bun run build -- --no-color && git add ./dist

View File

@ -1,4 +1,4 @@
{
"name": "setup-cpp",
"version": "1.1.1"
"version": "1.8.0"
}

View File

@ -1,84 +1,76 @@
{
"name": "setup-cpp",
"version": "1.1.1",
"version": "1.8.0",
"description": "Install all the tools required for building and testing C++/C projects.",
"repository": "https://github.com/aminya/setup-cpp",
"license": "Apache-2.0",
"author": "Amin Yahyaabadi",
"main": "dist/legacy/setup-cpp.js",
"modern": "./dist/modern/setup-cpp.mjs",
"source": "./src/setup-cpp.ts",
"main": "dist/library/lib.mjs",
"modern": "dist/library/lib.mjs",
"source": "./src/lib.ts",
"bin": {
"setup-cpp": "dist/legacy/setup-cpp.js"
},
"files": [
"action.yml",
".dockerignore",
"dist",
"src",
"packages",
"dev/docker",
"README.md",
"LICENSE.txt",
"LICENSE.dependencies.txt",
"package.json",
"package-version.json",
"tsconfig.json"
],
"scripts": {
"build": "turbo build && run-p lint.root.tsc build.vite build.vite.legacy && run-p build.json build.bash",
"build.vite": "cross-env NODE_ENV=production vite build",
"build.vite.legacy": "cross-env NODE_ENV=production TARGET=legacy vite build",
"build.json": "shx cp ./src/*/*.json ./dist/legacy/ && shx cp ./dist/legacy/*.json ./dist/modern && minijson --file ./dist/**/*.json",
"build": "turbo build && run-p build.types.modern lint.root.tsc build.cli.modern build.cli.legacy build.library && run-p build.json build.bash",
"build.cli.modern": "cross-env NODE_ENV=production vite build --mode cli-modern",
"build.cli.legacy": "cross-env NODE_ENV=production vite build --mode cli-legacy",
"build.library": "cross-env NODE_ENV=production vite build --mode library",
"build.types.modern": "tsc -p ./tsconfig.types.json",
"build.json": "shx cp ./src/*/*.json ./dist/legacy/ && shx cp ./dist/legacy/*.json ./dist/modern && bun ./node_modules/@aminya/minijson/dist/cli.js --file \"dist/**/*.json\"",
"build.bash": "shx cp ./src/*/*.bash ./dist/legacy/ && shx cp ./dist/legacy/*.bash ./dist/modern",
"bump": "ncu -u -x execa,numerous,eslint,@types/eslint,which && pnpm update && pnpx typesync && pnpm run clean",
"bump.llvm": "GITHUB_TOKEN=$(gh auth token) tsx ./src/llvm/assets-list.ts",
"bump.gcc": "GITHUB_TOKEN=$(gh auth token) tsx ./src/gcc/assets-list.ts",
"bump.infer": "GITHUB_TOKEN=$(gh auth token) tsx ./src/infer/assets-list.ts",
"bump.versions": "run-p bump.llvm bump.gcc bump.infer && run-s format",
"bump": "ncu -u -x execa,numerous,eslint,@types/eslint,which && bun update && pnpx typesync && bun run clean",
"bump.llvm": "tsx ./src/llvm/assets-list.ts",
"bump.gcc": "tsx ./src/gcc/assets-list.ts",
"bump.infer": "tsx ./src/infer/assets-list.ts",
"bump.versions": "run-p bump.llvm bump.gcc bump.infer && bun run format",
"clean": "shx rm -rf ./dist ./packages/*/dist ./exe ./.parcel-cache && shx mkdir -p ./dist/legacy ./dist/modern ./dist/modern ",
"dev.vite": "cross-env NODE_ENV=development vite build --watch",
"dev.packages": "turbo dev",
"dev.root.tsc": "tsc --noEmit --pretty --watch",
"dev": "run-p build.json dev.packages dev.root.tsc dev.vite",
"docs": "shx rm -rf packages/*/README.md && pnpm -r exec readme --path ../../dev/readme/template.md -y && pnpm -r exec ts-readme",
"format": "run-s lint.dprint",
"lint": "turbo lint && run-p --aggregate-output --continue-on-error lint.**",
"docs": "shx rm -rf packages/*/README.md && bun -r exec readme --path ../../dev/readme/template.md -y && bun -r exec ts-readme",
"format": "bun run lint.dprint",
"lint": "turbo lint && run-p --aggregate-output -c 'lint.*'",
"lint.cspell": "cspell lint --no-progress --show-suggestions --cache --cache-location ./.cache/cspell/.cspellcache",
"lint.biome": "biome check --write --unsafe",
"lint.dprint": "dprint fmt",
"lint.root.tsc": "tsc --noEmit --pretty",
"lint.root.eslint": "eslint './{src,dev}/**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml}' --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
"pack.exe": "shx rm -rf ./dist/tsconfig.tsbuildinfo && node ./dev/scripts/pack-exe.mjs",
"publish.all": "pnpm -r publish && pnpm publish",
"prepublishOnly": "run-s build && shx rm ./dist/tsconfig.tsbuildinfo",
"test.lint": "run-p --aggregate-output --continue-on-error test.lint.** lint.cspell lint.root.tsc",
"publish.all": "bun -r publish",
"prepublishOnly": "bun run build && bun shx rm ./dist/tsconfig.tsbuildinfo",
"test.lint": "run-p --aggregate-output -c 'test.lint.*' lint.cspell lint.root.tsc",
"test.lint.root.eslint": "eslint './{src,dev}/**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml}' --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/",
"test.lint.biome": "biome check",
"test.lint.dprint": "dprint check",
"test.docker": "tsx ./dev/docker/ci/tests/index.mts",
"test": "turbo test && jest --runInBand --forceExit --coverage",
"build.docker-ci": "node ./dev/docker/ci/docker-ci.mjs"
"build.docker-ci": "node ./dev/docker/ci/docker-ci.mjs",
"prepare": "bun ./patches/apply.mts"
},
"devDependencies": {
"@actions/cache": "^4.0.2",
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/http-client": "^2.2.3",
"@actions/http-client": "2.2.3",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.2",
"@aminya/minijson": "1.1.0",
"@aminya/minijson": "1.1.3",
"@babel/core": "^7.26.9",
"@babel/preset-typescript": "^7.27.1",
"@biomejs/biome": "^1.9.4",
"@iarna/toml": "^2.2.5",
"@liuli-util/vite-plugin-node": "^0.9.0",
"@octokit/core": "^6.1.4",
"@octokit/openapi-types": "^24.0.0",
"@octokit/plugin-paginate-rest": "^11.4.3",
"@octokit/plugin-rest-endpoint-methods": "^13.3.1",
"@octokit/rest": "^21.1.1",
"@octokit/types": "^13.8.0",
"@liuli-util/vite-plugin-node": "^0.10.0",
"@octokit/core": "^7.0.0",
"@octokit/openapi-types": "^25.0.0",
"@octokit/plugin-paginate-rest": "^13.0.0",
"@octokit/plugin-rest-endpoint-methods": "^16.0.0",
"@octokit/rest": "^22.0.0",
"@octokit/types": "^14.0.0",
"@pnpm/patching.apply-patch": "^1000.0.7",
"@shockpkg/archive-files": "3.2.5",
"@swc/cli": "^0.7.0",
"@swc/jest": "^0.2.37",
"@types/babel__core": "~7.20.5",
"@types/cross-spawn": "^6.0.6",
@ -91,16 +83,16 @@
"@types/node": "^22.13.8",
"@types/semver": "^7.5.8",
"@types/which": "^3.0.4",
"@upleveled/babel-plugin-remove-node-prefix": "github:aminya/babel-plugin-remove-node-prefix#02526f866c4f57d3a097590942dc0e700fb3eb15",
"@upleveled/babel-plugin-remove-node-prefix": "github:aminya/babel-plugin-remove-node-prefix",
"admina": "^1.0.1",
"caxa": "^3.0.1",
"ci-info": "^4.1.0",
"ci-log": "workspace:*",
"cross-env": "7.0.3",
"cross-spawn": "^7.0.6",
"cspell": "^8.17.5",
"cspell": "^9.0.0",
"diagnostics_channel": "^1.1.0",
"dprint": "^0.49.0",
"dprint": "^0.51.1",
"envosman": "workspace:*",
"escape-path-with-spaces": "^1.0.2",
"escape-quotes": "^1.0.2",
@ -113,44 +105,44 @@
"fs-extra": "^11.3.0",
"is-url-online": "^1.5.0",
"jest": "^29.7.0",
"lefthook": "^1.11.2",
"lefthook": "^2.0.14",
"macos-release": "^3.3.0",
"memoizee": "^0.4.17",
"mkdirp": "^3.0.1",
"mri": "^1.2.0",
"msvc-dev-cmd": "github:aminya/msvc-dev-cmd#c01f519bd995460228ed3dec4df51df92dc290fd",
"node-downloader-helper": "2.1.9",
"npm-check-updates": "^17.1.15",
"npm-run-all2": "^7.0.2",
"msvc-dev-cmd": "github:aminya/msvc-dev-cmd",
"node-downloader-helper": "2.1.10",
"npm-check-updates": "^19.3.1",
"npm-run-all2": "^8.0.4",
"numerous": "1.0.3",
"p-timeout": "^6.1.4",
"path-exists": "^5.0.0",
"patha": "^0.4.1",
"prettier": "3.5.2",
"prettier": "3.8.0",
"prettier-config-atomic": "^4.0.0",
"randomuuid-polyfill": "^1.0.2",
"readme-md-generator": "^1.0.0",
"retry-as-promised": "^7.1.1",
"rollup": "^4.34.9",
"safe-stable-stringify": "^2.5.0",
"semver": "7.7.1",
"semver": "7.7.3",
"setup-alpine": "workspace:*",
"setup-apt": "workspace:*",
"setup-brew": "workspace:*",
"setup-python": "github:aminya/setup-python#9700887",
"shx": "0.3.4",
"setup-python": "github:aminya/setup-python",
"shx": "0.4.0",
"simple-update-notifier": "^2.0.0",
"terser": "^5.39.0",
"terser-config-atomic": "^1.0.0",
"time-delta": "github:aminya/time-delta#69d91a4",
"time-delta": "github:aminya/time-delta",
"timers-browserify": "^2.0.12",
"ts-node": "^10.9.2",
"ts-readme": "^1.1.3",
"tsx": "^4.19.3",
"turbo": "2.4.4",
"tsx": "^4.20.3",
"turbo": "2.7.5",
"typescript": "^5.8.2",
"ubuntu-version": "^2.0.0",
"untildify-user": "workspace:*",
"util.types": "^0.0.2",
"vite": "^6.2.0",
"vite": "^7.3.1",
"vite-plugin-babel": "^1.3.0",
"web-streams-polyfill": "^4.1.0",
"which": "^4.0.0"
@ -183,22 +175,28 @@
"retry-as-promised",
"semver",
"setup-apt",
"setup-alpine",
"setup-brew",
"setup-python",
"simple-update-notifier",
"time-delta",
"ubuntu-version",
"untildify-user",
"util.types",
"web-streams-polyfill",
"timers-browserify",
"fs-extra"
"fs-extra",
"randomuuid-polyfill",
"mri",
"simple-update-notifier"
],
"overrides": {
"sort-package-json": "github:aminya/sort-package-json"
},
"engines": {
"node": ">=12.x",
"pnpm": "^10"
"bun": ">=1.3.6"
},
"packageManager": "pnpm@10.5.2",
"packageManager": "bun@1.3.6",
"workspaces": [
"packages/*"
],
@ -220,10 +218,5 @@
"cmake",
"ninja",
"meson"
],
"pnpm": {
"patchedDependencies": {
"@actions/http-client@2.2.3": "patches/@actions__http-client@2.2.3.patch"
}
}
]
}

View File

@ -0,0 +1,11 @@
import { error, info, notice, success, warning } from "../src/index.js"
describe("ci-log", () => {
it("should be a function", () => {
expect(error).toBeInstanceOf(Function)
expect(success).toBeInstanceOf(Function)
expect(warning).toBeInstanceOf(Function)
expect(notice).toBeInstanceOf(Function)
expect(info).toBeInstanceOf(Function)
})
})

View File

@ -0,0 +1,4 @@
{
"extends": "../tsconfig.json",
"include": ["**/*.ts"]
}

View File

@ -0,0 +1,2 @@
import jestConfig from "../../jest.config.mjs"
export default jestConfig

View File

@ -12,12 +12,14 @@
"scripts": {
"build": "tsc --pretty",
"dev": "tsc --watch --pretty",
"lint.tsc.test": "tsc --noEmit --pretty -p ./__tests__/tsconfig.json",
"lint.tsc": "tsc --noEmit --pretty",
"lint.eslint": "eslint '**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml}' --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
"prepublishOnly": "pnpm run build"
"prepublishOnly": "pnpm run build",
"test": "jest --coverage"
},
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/core": "^2.0.0",
"ci-info": "^4.0.0"
},
"keywords": [

View File

@ -0,0 +1,10 @@
import { addEnv, addPath, finalizeRC, sourceRC } from "../src/index.js"
describe("envosman", () => {
it("should be a function", () => {
expect(addEnv).toBeInstanceOf(Function)
expect(addPath).toBeInstanceOf(Function)
expect(finalizeRC).toBeInstanceOf(Function)
expect(sourceRC).toBeInstanceOf(Function)
})
})

View File

@ -0,0 +1,4 @@
{
"extends": "../tsconfig.json",
"include": ["**/*.ts"]
}

View File

@ -0,0 +1,2 @@
import jestConfig from "../../jest.config.mjs"
export default jestConfig

View File

@ -1,6 +1,6 @@
{
"name": "envosman",
"version": "1.0.3",
"version": "1.0.5",
"description": "Manage environment variables, PATH, and rc files",
"repository": "https://github.com/aminya/setup-cpp",
"homepage": "https://github.com/aminya/setup-cpp/tree/master/packages/envosman",
@ -12,13 +12,15 @@
"scripts": {
"build": "tsc --pretty",
"dev": "tsc --watch --pretty",
"lint.tsc.test": "tsc --noEmit --pretty -p ./__tests__/tsconfig.json",
"lint.tsc": "tsc --noEmit --pretty",
"lint.eslint": "eslint '**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml}' --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
"prepublishOnly": "pnpm run build"
"prepublishOnly": "pnpm run build",
"test": "jest --coverage"
},
"dependencies": {
"@actions/core": "^1.10.1",
"@types/node": "22.13.8",
"@actions/core": "^2.0.0",
"@types/node": "25.0.9",
"admina": "^1.0.1",
"ci-info": "^4.0.0",
"escape-path-with-spaces": "^1.0.2",
@ -47,6 +49,6 @@
],
"devDependencies": {
"@types/escape-quotes": "~1.0.0",
"@types/memoizee": "0.4.11"
"@types/memoizee": "0.4.12"
}
}

View File

@ -89,6 +89,8 @@ async function addEnvSystem(name: string, valGiven: string | undefined, options:
await appendFile(options.rcPath, `\nexport ${name}="${val}"\n`)
info(`${name}="${val}" was added to "${options.rcPath}`)
}
// eslint-disable-next-line require-atomic-updates
process.env[name] = val
return
}
default: {

View File

@ -1,4 +1,5 @@
import { promises } from "fs"
import { resolve } from "path"
import { grantUserWriteAccess } from "admina"
import { info, warning } from "ci-log"
import memoize from "memoizee"
@ -6,29 +7,40 @@ import { pathExists } from "path-exists"
import { untildifyUser } from "untildify-user"
const { appendFile, readFile, writeFile } = promises
export const defaultRcPath = untildifyUser("~/.bashrc")
export const defaultGuard = "envosman"
export const defaultRcPath = untildifyUser("~/.envosmanrc")
/**
* Options for adding an rc file
*/
export type RcOptions = {
/** The path to the RC file that the env variables should be added to. */
/** The path to the RC file that the env variables should be added to. (Default to "~/.envosmanrc") */
rcPath: string
/** Provide a name (your tool) to add a variable guard for sourcing your rc file */
/** Provide a name (your tool) to add a variable guard for sourcing your rc file (Default to "envosman") */
guard?: string
}
async function sourceRCInRc_(options: RcOptions) {
const sourceRcString = options.guard === undefined
? `\nsource "${options.rcPath}"\n`
: `\n# ${options.guard}\nif [[ "$SOURCE_${options.guard.toUpperCase()}RC" != 0 && -f "${options.rcPath}" ]]; then source "${options.rcPath}"; fi\n`
const bashrc = untildifyUser("~/.bashrc")
const profile = untildifyUser("~/.profile")
const rcPath = resolve(options.rcPath)
// avoid source loops
if (rcPath === bashrc || rcPath === profile) {
return
}
const guard = options.guard ?? defaultGuard
const sourceRcString =
`\n# ${guard}\nif [[ "$SOURCE_${guard.toUpperCase()}RC" != 0 && -f "${rcPath}" ]]; then source "${rcPath}"; fi\n`
try {
await Promise.all([
addRCHeader(options),
addSourceToTargetRc(sourceRcString, untildifyUser("~/.bashrc")),
addSourceToTargetRc(sourceRcString, untildifyUser("~/.profile")),
addSourceToTargetRc(sourceRcString, bashrc),
addSourceToTargetRc(sourceRcString, profile),
])
} catch (err) {
warning(`Failed to add ${sourceRcString} to .profile or .bashrc. You should add it manually: ${err}`)

View File

@ -0,0 +1,9 @@
import { execPowershell, execPowershellSync, getPowerShell } from "../src/index.js"
describe("exec-powershell", () => {
it("should be a function", () => {
expect(execPowershell).toBeInstanceOf(Function)
expect(execPowershellSync).toBeInstanceOf(Function)
expect(getPowerShell).toBeInstanceOf(Function)
})
})

View File

@ -0,0 +1,4 @@
{
"extends": "../tsconfig.json",
"include": ["**/*.ts"]
}

View File

@ -0,0 +1,2 @@
import jestConfig from "../../jest.config.mjs"
export default jestConfig

View File

@ -12,14 +12,16 @@
"scripts": {
"build": "tsc --pretty",
"dev": "tsc --watch --pretty",
"lint.tsc.test": "tsc --noEmit --pretty -p ./__tests__/tsconfig.json",
"lint.tsc": "tsc --noEmit --pretty",
"lint.eslint": "eslint '**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml}' --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
"prepublishOnly": "pnpm run build"
"prepublishOnly": "pnpm run build",
"test": "jest --coverage"
},
"dependencies": {
"execa": "7.2.0",
"which": "^4.0.0",
"@types/node": "^22.0.0"
"@types/node": "^25.0.0"
},
"devDependencies": {
"@types/which": "^3.0.0"

View File

@ -0,0 +1,3 @@
{
"extends": "../../.eslintrc.json"
}

View File

@ -0,0 +1,8 @@
import { hasApk, installApkPack } from "../src/index.js"
describe("setup-alpine", () => {
it("should be a function", () => {
expect(installApkPack).toBeInstanceOf(Function)
expect(hasApk).toBeInstanceOf(Function)
})
})

View File

@ -0,0 +1,4 @@
{
"extends": "../tsconfig.json",
"include": ["**/*.ts"]
}

View File

@ -0,0 +1,2 @@
import jestConfig from "../../jest.config.mjs"
export default jestConfig

View File

@ -0,0 +1,56 @@
{
"name": "setup-alpine",
"version": "1.1.0",
"description": "Setup apk packages and repositories in Alpine Linux distributions",
"repository": "https://github.com/aminya/setup-cpp",
"homepage": "https://github.com/aminya/setup-cpp/tree/master/packages/setup-alpine",
"license": "Apache-2.0",
"author": "Amin Yahyaabadi",
"main": "./dist/index.js",
"source": "./src/index.ts",
"type": "module",
"files": [
"dist",
"src",
"tsconfig.json"
],
"scripts": {
"build": "tsc --pretty",
"dev": "tsc --watch --pretty",
"lint.tsc.test": "tsc --noEmit --pretty -p ./__tests__/tsconfig.json",
"lint.tsc": "tsc --noEmit --pretty",
"lint.eslint": "eslint '**/*.{ts,tsx,js,jsx,cjs,mjs,json,yaml}' --no-error-on-unmatched-pattern --cache --cache-location ./.cache/eslint/ --fix",
"prepublishOnly": "pnpm run build",
"test": "jest --coverage"
},
"dependencies": {
"@types/node": "25.0.9",
"admina": "^1.0.1",
"path-exists": "^5.0.0",
"ci-log": "workspace:*",
"envosman": "workspace:*",
"which": "4.0.0",
"execa": "7.2.0",
"memoizee": "^0.4.17"
},
"engines": {
"node": ">=12"
},
"keywords": [
"setup",
"apk",
"apk-add",
"repository",
"alpine",
"install",
"setup-apk",
"repositories",
"linux",
"alpine-linux",
"package"
],
"devDependencies": {
"@types/memoizee": "0.4.12",
"@types/which": "~3.0.4"
}
}

View File

@ -0,0 +1,60 @@
import { info } from "ci-log"
import { appendFile, readFile } from "fs/promises"
import { pathExists } from "path-exists"
import { hasApk } from "./has-apk.js"
import { updateApkMemoized } from "./update.js"
/**
* Add an APK repository
* @param repoUrl The URL of the repository to add
* @returns Whether the repository was added successfully
*/
export async function addApkRepository(repoUrl: string): Promise<boolean> {
if (!(await hasApk())) {
throw new Error("apk is not available on this system")
}
try {
// Check if repositories file exists
const reposFile = "/etc/apk/repositories"
if (!(await pathExists(reposFile))) {
throw new Error(`APK repositories file not found at ${reposFile}`)
}
// Add repository to the file
info(`Adding repository: ${repoUrl}`)
await appendFile(reposFile, `${repoUrl}\n`)
// Update package index after adding repository
await updateApkMemoized.clear()
await updateApkMemoized()
info(`Successfully added repository: ${repoUrl}`)
return true
} catch (error) {
throw new Error(`Failed to add repository ${repoUrl}: ${error}`)
}
}
/**
* Enable the community repository
* @returns Whether the repository was added successfully
*/
export async function enableCommunityRepository() {
const alpineVersion = (await getAlpineVersion()).split(".").slice(0, 2).join(".")
return addApkRepository(`https://dl-cdn.alpinelinux.org/alpine/v${alpineVersion}/community/`)
}
/**
* Get the Alpine version
* @returns The Alpine version
*/
export async function getAlpineVersion() {
const releaseFile = "/etc/alpine-release"
if (!(await pathExists(releaseFile))) {
throw new Error(`Alpine release file not found at ${releaseFile}`)
}
return readFile(releaseFile, "utf8")
}

View File

@ -0,0 +1,19 @@
import memoizee from "memoizee"
import which from "which"
import { isAlpine } from "./is-alpine.js"
async function hasApk_() {
if (!isAlpine()) {
return false
}
try {
await which("apk")
return true
} catch {
return false
}
}
/**
* Check if apk is available on the system
*/
export const hasApk = memoizee(hasApk_, { promise: true })

View File

@ -0,0 +1,7 @@
export * from "./apk-repository.js"
export * from "./has-apk.js"
export * from "./init-apt.js"
export * from "./install-package.js"
export * from "./is-alpine.js"
export * from "./qualify-install.js"
export * from "./update.js"

View File

@ -0,0 +1,19 @@
import { defaultExecOptions, execRootSync } from "admina"
import memoize from "memoizee"
import { filterAndQualifyApkPackages } from "./qualify-install.js"
/** Install bash (usually missing from docker containers) */
export async function initApk() {
const toInstall = await filterAndQualifyApkPackages([
{ name: "bash" },
])
if (toInstall.length !== 0) {
execRootSync("apk", ["add", ...toInstall], {
...defaultExecOptions,
})
}
}
/** Install bash (usually missing from docker containers) (memoized) */
export const initApkMemoized = memoize(initApk, { promise: true })

Some files were not shown because too many files have changed in this diff Show More