Commit Graph

168 Commits

Author SHA1 Message Date
Martin Storsjö 0979cfdd38 build-python: Update to Python 3.14.5 2026-06-04 12:38:09 +03:00
Martin Storsjö 658144313c WIP: github: Test the Dockerfile.cross
Run this with the non-dev version of the image, which is the
previous release, so we end up fetching a new version of llvm,
instead of reusing whatever was checked out in the dev image.
2026-06-04 12:35:22 +03:00
Martin Storsjö c8cb7b2852 WIP: github: Enable/disable jobs for testing Python
Run the testsuites on Windows, which use the just-built Python,
but skip other jobs.
2026-06-04 12:35:22 +03:00
Martin Storsjö a94160ee67 WIP: github: Switch the roles of x86_64 and aarch64 in the linux jobs 2026-06-04 12:35:22 +03:00
Martin Storsjö 3bce563ec8 Revert "github: Build with PGO/LTO" 2026-06-04 12:35:22 +03:00
Martin Storsjö 13e18154e6 github: Upgrade dawidd6/action-download-artifact to v19 2026-03-21 15:31:53 +02:00
Martin Storsjö 98dddfb9a4 github: Upgrade cache@v4 to cache@v5 2026-03-13 12:19:18 +02:00
Martin Storsjö c7e087fbd4 github: Upgrade download-artifact@v7 to download-artifact@v8
This has some behaviour changes, but I believe it shouldn't hit
our usage.
2026-03-13 12:19:18 +02:00
Martin Storsjö b8c5a4ffa1 github: Upgrade download-artifact@v4 to download-artifact@v7 2026-03-13 12:19:18 +02:00
Martin Storsjö ed1e71ba54 github: Upgrade upload-artifact@v4 to upload-artifact@v6 2026-03-13 12:19:18 +02:00
Martin Storsjö 89faddb7a3 github: Upgrade checkout@v4 to checkout@v6
checkout@v5 should be the same as checkout@v4, just running on
Node 24. checkout@v6 has got a few other minor changes that
shouldn't make any difference; opt in to newer behaviours now.
2026-03-13 12:19:18 +02:00
Martin Storsjö 84c8483eba github: Fix testing openmp in the runtimes build
This makes sure the openmp tests actually are executed; since
switching to the runtimes build of openmp for the tests (in
98684ab807), the tests weren't
executed, as it no longer found the tools necessary for executing
the tests - as they are expected to be specified differently
in the runtimes build mode.

This requires the commit 48a5119d8e7d7236a28c14d06ec215ef3366ef90
(backported to 22.x in 9794a7932465bdc244b327388905d66df38485e2,
part of the 22.1.1 release) in llvm-project, to be able to run
tests without actually building clang in the same build as the
test tools.
2026-03-11 22:00:27 +02:00
Martin Storsjö 98684ab807 github: Try to test openmp through the runtimes directory
Since 6295b8e763503644961f9087382f80965b98d466 in llvm-project,
one no longer can configure the openmp project entirely standalone,
one has to do it through the runtimes directory.

However, in practice, this currently leads to no tests being
executed at all, as the runtimes build setup doesn't support
pointing to an external FileCheck executable - it currently has
to be part of a full bootstrapping build.
2026-02-19 23:37:10 +02:00
Martin Storsjö f25f2fb3aa build-python: Update to Python 3.13.11 2026-01-19 00:00:37 +02:00
Martin Storsjö f5335a4479 github: Run test-toolchain using busybox rather than msys2 2026-01-08 11:34:24 +02:00
Martin Storsjö 17864b5274 github: Build busybox in the windows toolchains 2026-01-08 11:34:24 +02:00
Martin Storsjö 6465b7f2ca github: Cache the gnu make tarball in the msvcrt build too
This applies the changes from b0bbde0073
to the msvcrt toolchain build as well.
2025-12-17 13:48:30 +02:00
Martin Storsjö b0bbde0073 github: Cache the gnu make tarball
This avoids breaking the build if the gnu download server is
unavailable.
2025-12-02 13:56:12 +02:00
Martin Storsjö 06e91d01b0 github: Fix passing arguments to lit for the openmp tests
The previous parameter wasn't used.
2025-12-02 13:38:47 +02:00
Martin Storsjö 3766326dbb github: Stop specifying CMAKE_CXX_COMPILER_TARGET
The preinstalled CMake on the ARM64 runners now should be a native
ARM64 CMake, which allows autodetecting CMAKE_CXX_COMPILER_TARGET
correctly.
2025-09-23 14:00:00 +03:00
Martin Storsjö adcf12dae0 github: Stop building in the mingw64 environment in msys2
These builds fail regularly, under mysterious circumstances.
("The hosted runner lost communication with the server. Anything
in your workflow that terminates the runner process, starves it
for CPU/Memory, or blocks its network access can cause this error.")

This usually seems to happen around the build-libcxx.sh step.
2025-09-22 12:25:27 +03:00
Martin Storsjö 1a25a0ff74 github: Switch macos jobs to macos-14 runners explicitly
For some unknown reason, macos-15 runners (which macos-latest
resolves to currently) seem to be consistently 25-40% slower than
macos-14 runners; the "macos" job (doing an universal binary build
for 2 architectures, with LTO) often take over 5 hours, and have
reached the 6 hour timeout once.

Switch this back to macos-14 to speed it up and reduce the risk of
hitting the timeout.

In the future, if/when the macos-14 runners are phased out, and if
the performance reduction in macos-15 runners remains, we'd need to
switch to building each architecture in a separate job, and merge
them together separately if we still want to provide universal
binaries.
2025-08-30 23:03:55 +03:00
Martin Storsjö 5c5a462dd1 github: Stop manually installing ninja on Windows
Since https://github.com/actions/runner-images/pull/11706,
https://github.com/actions/runner-images/pull/11707 and
https://github.com/actions/runner-images/pull/11737, ninja is
preinstalled in the Ubuntu, macOS and x86 Windows runner images.
Thanks to that, redundant installs of ninja on Unix were removed
in e20f0e3acd.

As noted in https://github.com/actions/partner-runner-images/issues/96,
ninja now also seems to be available on the Windows on ARM
images - thus remove redundant installs of ninja on Windows.
2025-08-21 00:13:51 +03:00
Martin Storsjö 2324d8354f github: Simplify running the msvcrt workflow on push, for testing
Only pick parameters from "inputs" if we were invoked through a
"workflow_dispatch" event.
2025-07-29 22:40:34 +03:00
Martin Storsjö 0681c739aa github: Run tests directly after cross compiling the msvcrt runtimes
This matches what is done for the regular builds; we run (build-only)
tests already with the first cross compiler toolchains, not needing
to wait for the cross compiled toolchains to run on Windows.
2025-07-29 22:39:28 +03:00
Martin Storsjö 67827c9569 github: Switch the condition for inputs vs defaults for test-llvm and test-libcxx
This makes it easier to run these workflows through a push (by
adding an "on:push:" at the start of the files.
2025-07-29 22:38:54 +03:00
Martin Storsjö 848bf53fe0 github: Pass -D__USE_MINGW_ANSI_STDIO=1 for test-llvm on x86
This is required for properly formatting long doubles on x86
with UCRT (which doesn't use the mingw builtin printfs by default).

This fixes running the LLVM testsuite on x86 after commit
9bf7d04c4386daf1ef0acf95782a59855c98474a in llvm-project.
2025-07-29 22:38:25 +03:00
Martin Storsjö 0d59f0f827 github: Skip the stage1 artifacts when making a release
The linux stage1 artifacts were uploaded, while the macos ones
weren't (as they didn't match the *-toolchain glob pattern).
2025-07-19 11:21:19 +03:00
Martin Storsjö 09c5a4e822 github: Fix the use of dawidd6/action-download-artifact in msvcrt.yml
The older version doesn't support the ref parameter.
2025-07-18 19:47:04 +03:00
Martin Storsjö f5a90414dd github: Stop running armv7 binaries
The ARM github actions runners now run on Windows 11 10.0.26100,
which no longer support executing armv7 binaries. (Previously they
were running Windows 11 10.0.22631.)
2025-07-16 09:58:18 +03:00
Martin Storsjö 081b68c2bb github: Include the architecture in the linux-asserts artifact name
This should make it clearer what it is.
2025-06-30 14:13:36 +03:00
Martin Storsjö 8e90268bf3 github: Simplify the if: conditions for all chained jobs
As all the other jobs depend on the "prepare" job, it's enough to
keep the condition within the "prepare" job and remove/simplify
the rest.
2025-06-30 14:13:23 +03:00
Martin Storsjö 6cc02cf854 github: Update a comment to refer to the right job 2025-06-30 14:12:02 +03:00
Martin Storsjö 04bc2bc1c5 github: Build the whole multiplatform docker image with Dockerfile.toolchain
This makes the docker image contain a PGO optimized compiler,
without needing to redo all of the PGO build stages in docker.

This reverts commit 8f42112719,
and fixes building the multiplatform image in a simpler way.

Instead of doing two separate builds, with separate Dockerfiles,
just do one multiplatform build of one Dockerfile, which
docker runs serially, for each one of the included architectures,
just packaging the prebuilt toolchains in the docker image.
2025-06-25 11:51:07 +03:00
Martin Storsjö ca34a15634 github: Build the msvcrt toolchains with LTO and PGO 2025-06-25 11:51:07 +03:00
Martin Storsjö 80fad73644 github: Build with PGO
Using Frontend instrumentation rather than IR. This gives less
total speedup, but makes the profile much more usable for cross
other build targets.

Build the full Linux toolchain in stage1; this avoids needing to
rebuild runtimes for doing the profiling in stage2, and avoids
needing to wait for stage3 to complete before cross building
for Windows.
2025-06-25 11:51:07 +03:00
Martin Storsjö 05625eaf62 github: Build the linux full toolchain already in stage1
This makes a cross compiler available before doing the full second
stage.
2025-06-25 11:51:07 +03:00
Martin Storsjö bc8eea6fc0 github: Build all second stage toolchains with thinlto 2025-06-25 11:51:07 +03:00
Martin Storsjö eb3cb9c31d github: Build macOS and Linux toolchains with a stage1 Clang 2025-06-25 11:51:07 +03:00
Martin Storsjö 9633e7501c github: Use dawidd6/action-download-artifact with the new ref: option
This allows specifying either a commit or a branch in the same
field, allowing simplifying both the workflow inputs, and
the expressions for passing commit/branch to both
dawidd6/action-download-artifact and actions/checkout.

This new option is available since
https://github.com/dawidd6/action-download-artifact/pull/329.
2025-06-03 16:36:12 +03:00
Martin Storsjö 5110f3da62 github: Update a comment about the homebrew libraries' architectures 2025-05-31 00:01:36 +03:00
Martin Storsjö 718a31ef1a github: Run the test-llvm and test-libcxx jobs scheduled on Sundays
In this case, run with the artifacts from the latest scheduled job.
2025-05-29 17:27:53 +03:00
Martin Storsjö 7b53b4af23 github: Fix specifying a commit rather than a branch for manual jobs
As the branch field has a default value "master", this default
not only applies when the dialog box for starting the manual
workflow is presented. But even if the prefilled branch field
is cleared, the default value also gets substituted when submitting.

In this case, when the commit and branch fields are mutually
exclusive, we can't easily have a default. Instead change the
uses of the fields, ignoring the branch field if the commit field
is filled.

If the dawidd6/action-download-artifact action would support
specifying either a commit or a branch in the same field, like
actions/checkout does, we wouldn't need this distinction at all;
this request is tracked upstream at
https://github.com/dawidd6/action-download-artifact/issues/242.
2025-05-29 17:27:53 +03:00
Martin Storsjö 20ea49c91e github: Build test-libcxx with __USE_MINGW_ANSI_STDIO=0 on arm
On arm, we don't need to use the mingw custom printfs for long
doubles.
2025-05-25 16:00:55 +03:00
Martin Storsjö 38847df515 github: Use msys instead of mingw64 for running test-toolchain 2025-05-25 12:08:21 +03:00
Martin Storsjö e20f0e3acd github: Stop manually installing ninja
Since https://github.com/actions/runner-images/pull/11706,
https://github.com/actions/runner-images/pull/11707 and
https://github.com/actions/runner-images/pull/11737, ninja is
preinstalled in the Ubuntu, macOS and x86 Windows runner images.
(See https://github.com/actions/runner-images/issues/11391 for the
overall issue where this was finally agreed to be installed.)

It is still missing in the windows-11-arm images though, so keep
installing it in any jobs running on Windows.
2025-05-24 23:46:55 +03:00
Martin Storsjö 16b3ddfbfc github: Use "check-runtimes" rather than individual "check-cxx" etc
This makes sure to run all three testsuites, even if there are
failures in one of them.
2025-05-23 14:54:42 +03:00
Martin Storsjö d1ca6b578a github: Run test-libcxx on ARM too
This requires setting CMAKE_CXX_COMPILER_TARGET manually; the LLVM
build system infers the wrong architecture when CMake is an
x86_64 binary.

(The wrong inferred architecture doesn't affect building libcxx,
but the wrong architecture gets passed as --target= parameter
when running the tests.)

Since 9c67ae861ccb0312fc680414a8441892d169d14a in llvm-project
(May 9th), these tests should pass on aarch64 too.

Co-authored-by: Jeremy Drake <github@jdrake.com>
2025-05-10 11:53:04 +03:00
Martin Storsjö 6db08d6e89 github: Switch back to macos-latest for the runners
Currently, "macos-latest" gets "macos-14", while there also are
"macos-15" runners available. Switch back to the latest variant
in preparation for that being updated at some point.

This reverts 7bd4b284f9.
2025-05-09 11:59:08 +03:00
Martin Storsjö 218ddb0bbd github: Run test-llvm on aarch64 too
As the preinstalled CMake on the windows-11-arm runners currently
is an x86_64 build, we need to explicitly specify
CMAKE_SYSTEM_PROCESSOR, and CMAKE_SYSTEM_NAME to make CMake
consider it a cross compilation (otherwise CMAKE_SYSTEM_PROCESSOR
gets overridden by CMAKE_HOST_SYSTEM_PROCESSOR, which gets influenced
by the x86_64 as CMake is running emulated).

We also need to set LLVM_HOST_TRIPLE, as the autodetection of
it relies on CMAKE_HOST_SYSTEM_PROCESSOR. The host triple needs
to be in normalized form with "-windows-gnu", otherwise a couple
dozens of tests fail.

We also include the AArch64 target, to make sure the built compiler
can generate code for the host.

Since 07bc54bf4554398b199f4dc849e5193b98422f23 in llvm-project
(May 5th), these tests should pass on aarch64 too.
2025-05-07 00:30:08 +03:00