Commit Graph
138 Commits
Author SHA1 Message Date
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öandJeremy Drake 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
Martin Storsjö 0a1f0030c1 github: Run test-compiler-rt on ARM too
Since 3e56f5f41843204b6e612362542b77110f8f8188 in llvm-project,
this should pass for all 4 architectures. (This doesn't pass
in the pinned release version right now.)
2025-05-06 16:38:13 +03:00
Martin Storsjö 9eb743ea3e github: Run test-openmp on ARM too 2025-05-06 16:36:53 +03:00
Jeremy Drake d7d9021b35 github: Run test-toolchain on ARM too 2025-05-06 16:36:50 +03:00
Martin Storsjö 7bc6345fa7 github: Copy in the dependency DLLs into the bin dir in test-llvm
This avoids relying on finding these dependencies in $PATH while
running the tests. Some tests may set PATH="" while executing them,
which previously caused those tests to fail in this build setup.

The same is not an issue with MSVC builds with
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL, because those
DLLs are also available in global system directories (including
DLLs such as msvcp140.dll and vcruntime140.dll).
2025-05-06 11:23:42 +03:00
Martin Storsjö 11c51c62d4 run-tests: Rewrite detection of what tests we can try to execute
Autodetect whether we can run tests in Wine on unix.
2025-04-21 14:30:12 +03:00
Martin Storsjö 3976b3af59 github: Set -DCMAKE_INSTALL_MESSAGE=NEVER when testing libcxx
This matches what 28851edf164a337c334755ae33fd58f03cffd5a2 in
llvm-project did.

When setting up the built libcxx files for testing, the built
files are installed into a temporary test root, and the install of
them litters the build log with mostly uninteresting output.
2025-04-20 23:27:18 +03:00
Martin Storsjö bd9d08209b github: Build the pinned Ubuntu jobs on 22.04
This makes the prebuilt toolchains require 22.04.

The GitHub Actions Ubuntu 20.04 images are deprecated and are
being removed soon, see
https://github.com/actions/runner-images/issues/11101.
2025-04-09 14:30:07 +03:00
Martin Storsjö a57b84d1ae github: Switch DOCKER_USERNAME to a variable instead of a secret
This will allow avoiding masking out this string from the log output.
2025-04-09 13:35:20 +03:00
Martin Storsjö 6144b2e3dd github: Update to checking the mingw-v3.12.9 branch of cpython-mingw
This was missed in 61044083ab.
2025-04-04 11:29:49 +03:00
Martin Storsjö 56b7ba6871 github: Stop setting LLVM_ENABLE_TERMINFO
This option was removed in 852aaf54071ad072335dcac57f544d4da34c875a
in llvm-project, in May 2024.
2025-04-01 23:22:50 +03:00
Martin Storsjö f1f6c009d6 Revert "github: Pin a specific image for QEMU for Docker"
This reverts commit 3dbfd17270.

This shouldn't be necessary any longer; QEMU in
tonistiigi/binfmt:latest has been updated to 9.2.2, which has
this bug fixed - see
https://github.com/docker/setup-qemu-action/issues/198#issuecomment-2690225370
https://github.com/tonistiigi/binfmt/issues/215#issuecomment-2689340770
and https://gitlab.com/qemu-project/qemu/-/issues/1913.
2025-02-28 12:10:26 +02:00
Martin Storsjö 3dbfd17270 github: Pin a specific image for QEMU for Docker
This fixes temporary breakage in building arm64 docker images on
x86_64; see https://github.com/docker/setup-qemu-action/issues/198
and https://github.com/tonistiigi/binfmt/issues/240 for details
about this issue.
2025-02-16 23:07:06 +02:00
Martin Storsjö 77dddbcb9a github: Remove a stale leftover comment
This comment no longer was true after
3becea478f.
2025-02-04 12:03:49 +02:00
Martin Storsjö 6de7ef249e github: Install libltdl-dev in the msvcrt job, too
This was missed in 9e22cdbc9f.
2025-01-15 12:17:35 +02:00
Martin Storsjö 9e22cdbc9f github: Install libltdl-dev in the linux-cross-windows build job
This is required for building libffi. With ubuntu-22.04 images,
the libltdl-dev package was available out of the box.

Also explicitly install swig, which we rely on - this also seems
to have been available implicitly.
2025-01-07 15:07:08 +02:00
Martin Storsjö 09d5ba264e github: Bump to building ffmpeg 6.1.2 rather than 6.0
This fixes building on Ubuntu 24.04 (the one currently used by
the github actions ubuntu-latest tag), by including a fix for texinfo
7.0.

Not bumping to ffmpeg 7.x, as some tests there can be flaky at times.
2025-01-07 14:34:02 +02:00
Martin Storsjö 5fe69a92ac build-python: Bump to Python 3.12.7 2024-12-10 11:24:43 +02:00
dependabot[bot] fdf064a647 build(deps): bump dawidd6/action-download-artifact in /.github/workflows
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 3 to 6.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](https://github.com/dawidd6/action-download-artifact/compare/v3...v6)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-27 10:59:35 +02:00
Martin Storsjö df52fcb4da github: Set LLVM_LIT_ARGS for the compiler-rt and openmp tests
This allows inspecting exactly which tests actually were executed
or skipped, and also gives some insight into what tests are slow.
2024-11-19 11:22:12 +02:00
Martin Storsjö 179f412f25 github: Don't unnecessarily add the toolchain path to GITHUB_PATH
The win32 path environment isn't inherited by the msys2 shell
anyway.
2024-08-20 11:31:04 +03:00
Martin Storsjö e3790acf7d test: Set the NATIVE= variable automatically in test-libcxx-module.sh 2024-08-20 11:31:04 +03:00
Martin Storsjö 82c00fcf4b github: Stop explicitly installing gnu-tar on macOS
These days, it seems to be installed out of the box already on the
runner images, and installing it triggers very visible warnings
about it already being installed.
2024-06-26 11:43:13 +03:00
Martin Storsjö d173245e53 github: Set a default for the "branch" input for manual workflows 2024-06-07 13:19:28 +03:00
Martin Storsjö 9b1884206c github: Include clang-tools-extra in the linux/linux-aarch64/macos jobs
As the runners are faster these days, the cost of including these
tools should be more tolerable these days.
2024-06-03 12:36:44 +03:00
Martin Storsjö 6c748d21dd test: Test the clang-scan-deps wrapper 2024-05-02 20:03:56 +03:00
Martin Storsjö 334794b40d test: Do a minimal test to try to build the libcxx std c++ module 2024-05-02 20:03:56 +03:00
Martin Storsjö 7bd4b284f9 github: Switch the macos build job to macos-14
Currently, the "macos-latest" runners aren't really the latest
version - on the contrary, they're running the oldest HW/OS.

Currently, there are macos-12, macos-13 and macos-14, and macos-latest
are the macos-12 ones.

The macos-14 ones run on Apple Silicon.

Previously, the macos-12 runners have usually managed to run the build
job in less than 3 hours. However, lately, the jobs often end up
taking much longer, over 5 hours, and have ended up exceeding the
6 hour timeout occasionally, even if they still also some times run
in the expected time of less than 3 hours.

Switch to the faster macos-14 runners (which can complete the build
job in around 1 h 40 min), to avoid these timeouts.
2024-04-22 23:40:22 +03:00
Martin Storsjö e39faace92 github: Run toolchain tests in the linux/linux-asserts/macos jobs
Run the plain compilation part, without executing things (in order
not to require wine at this point).
2024-03-13 11:30:14 +02:00
Martin Storsjö 46884dc037 github: Don't upload the msys2 artifacts along with the release
They weren't intended to be part of the artifacts as part of the
release; the artifacts were added just for testing purposes.
2024-03-08 23:56:13 +02:00
Martin Storsjö 8f42112719 github: Build the multiplatform docker image in two steps
6b6b1240e2 tried to build a
multiplatform image, by building two images separately and pushing
them one at a time, with the same name (but with a different platform).

This doesn't work as expected; the last push for the image name
replaces earlier pushes. So depending on which push finishes
last, we'd end up with either an amd64 or arm64 image, but not
one that supports both.

Instead, push two separate images just with push-by-digest, and
then create the actual tag with "docker buildx imagetools create".

Alternatively, we could build all platform variants of the main
image with Dockerfile.toolchain, simplifying the setup significantly.
The contents of such a build is marginally different though, so
keep the amd64 image as it was, for now, compiled in that environment.
2024-02-27 23:31:00 +02:00