From a67ebd03959d26f3cdced468e10e35b08c89c8e0 Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Mon, 9 Sep 2024 14:58:14 +0200 Subject: [PATCH 1/4] Extend runner to support musl --- .github/runner.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/runner.sh b/.github/runner.sh index 1d88a8ab3..32aa5b875 100755 --- a/.github/runner.sh +++ b/.github/runner.sh @@ -58,6 +58,10 @@ setup() { sudo apt-get install pkg-config:i386 libzstd1:i386 libzstd-dev:i386 \ libgcc-s1:i386 gcc-multilib g++-multilib ;; + linux,*musl*) + sudo apt-get update + sudo apt-get install musl-tools + ;; esac } @@ -134,6 +138,14 @@ build_ocaml() { exit 1 fi ;; + linux,*musl*) + printf 'Running: %s\n' \ + "./configure \"CC=musl-gcc\" \"CFLAGS=-Os\" \"ASPP=musl-gcc -c\" $opts" + if ! ./configure "CC=musl-gcc" "CFLAGS=-Os" "ASPP=musl-gcc -c" $opts ; then + cat config.log + exit 1 + fi + ;; *) # linux, macos, default options printf 'Running: %s\n' "./configure $opts" if ! ./configure $opts ; then From 5f29730a9814afc22ead31884ea892e49ccafb90 Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Mon, 9 Sep 2024 15:03:58 +0200 Subject: [PATCH 2/4] Add musl workflows --- .github/workflows/linux-500-musl.yml | 15 +++++++++++++++ .github/workflows/linux-51x-musl.yml | 15 +++++++++++++++ .github/workflows/linux-520-musl.yml | 15 +++++++++++++++ .github/workflows/linux-530-trunk-musl.yml | 19 +++++++++++++++++++ .github/workflows/linux-540-trunk-musl.yml | 19 +++++++++++++++++++ 5 files changed, 83 insertions(+) create mode 100644 .github/workflows/linux-500-musl.yml create mode 100644 .github/workflows/linux-51x-musl.yml create mode 100644 .github/workflows/linux-520-musl.yml create mode 100644 .github/workflows/linux-530-trunk-musl.yml create mode 100644 .github/workflows/linux-540-trunk-musl.yml diff --git a/.github/workflows/linux-500-musl.yml b/.github/workflows/linux-500-musl.yml new file mode 100644 index 000000000..8dbeb3c7a --- /dev/null +++ b/.github/workflows/linux-500-musl.yml @@ -0,0 +1,15 @@ +name: musl 5.0.0 + +on: + schedule: + # Every Sunday morning, at 1:11 UTC + - cron: '11 1 * * 0' + workflow_dispatch: + +jobs: + build: + uses: ./.github/workflows/common.yml + with: + compiler_ref: refs/tags/5.0.0 + options: musl + timeout: 240 diff --git a/.github/workflows/linux-51x-musl.yml b/.github/workflows/linux-51x-musl.yml new file mode 100644 index 000000000..3be94f643 --- /dev/null +++ b/.github/workflows/linux-51x-musl.yml @@ -0,0 +1,15 @@ +name: musl 5.1 + +on: + schedule: + # Every Sunday morning, at 2:22 UTC + - cron: '22 2 * * 0' + workflow_dispatch: + +jobs: + build: + uses: ./.github/workflows/common.yml + with: + compiler_ref: refs/tags/5.1.1 + options: musl + timeout: 240 diff --git a/.github/workflows/linux-520-musl.yml b/.github/workflows/linux-520-musl.yml new file mode 100644 index 000000000..abd0a121f --- /dev/null +++ b/.github/workflows/linux-520-musl.yml @@ -0,0 +1,15 @@ +name: musl 5.2 + +on: + schedule: + # Every Monday morning, at 1:11 UTC + - cron: '11 1 * * 1' + workflow_dispatch: + +jobs: + build: + uses: ./.github/workflows/common.yml + with: + compiler_ref: refs/tags/5.2.0 + options: musl + timeout: 240 diff --git a/.github/workflows/linux-530-trunk-musl.yml b/.github/workflows/linux-530-trunk-musl.yml new file mode 100644 index 000000000..43d279c8d --- /dev/null +++ b/.github/workflows/linux-530-trunk-musl.yml @@ -0,0 +1,19 @@ +name: musl 5.3 + +on: + schedule: + # Every Monday morning, at 2:22 UTC + - cron: '22 2 * * 1' + pull_request: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + uses: ./.github/workflows/common.yml + with: + compiler_ref: refs/heads/5.3 + options: musl + timeout: 240 diff --git a/.github/workflows/linux-540-trunk-musl.yml b/.github/workflows/linux-540-trunk-musl.yml new file mode 100644 index 000000000..f111c562f --- /dev/null +++ b/.github/workflows/linux-540-trunk-musl.yml @@ -0,0 +1,19 @@ +name: musl trunk + +on: + schedule: + # Every Monday morning, at 3:33 UTC + - cron: '33 3 * * 1' + pull_request: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + uses: ./.github/workflows/common.yml + with: + compiler_ref: refs/heads/trunk + options: musl + timeout: 240 From 2b75bfc913bc455516d64f21e558e7a5e509615d Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Tue, 10 Sep 2024 10:19:28 +0200 Subject: [PATCH 3/4] Document 'musl' option in common.ml --- .github/workflows/common.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index f888255cb..17150cddc 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -14,7 +14,7 @@ on: options: description: >- Configuration options for the compiler. - Space-separated list of '32bit', 'bytecode-only', 'fp'. + Space-separated list of '32bit', 'bytecode-only', 'fp', 'musl'. type: string default: '' platform: From c0e556ee91c452a76e6ec2378af5cdb3187f6682 Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Wed, 18 Dec 2024 13:10:46 +0100 Subject: [PATCH 4/4] Add musl workflow badges to front page --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 6417517b5..888ca533b 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Multicore tests [![macOS-ARM64 5.0.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-arm64-500.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-arm64-500.yml) [![Linux 5.0.0-bytecode](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-bytecode.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-bytecode.yml) [![Linux 5.0.0-debug](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-debug.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-debug.yml) +[![Linux 5.0.0-musl](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-musl.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-musl.yml) [![Linux 32-bit 5.0.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-32bit.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-500-32bit.yml) [![MinGW 5.0.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/mingw-500.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/mingw-500.yml) [![MinGW 5.0.0-bytecode](https://github.com/ocaml-multicore/multicoretests/actions/workflows/mingw-500-bytecode.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/mingw-500-bytecode.yml) @@ -17,6 +18,7 @@ Multicore tests [![macOS-ARM64 5.1.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-arm64-51x.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-arm64-51x.yml) [![Linux 5.1.0-bytecode](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-51x-bytecode.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-51x-bytecode.yml) [![Linux 5.1.0-debug](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-51x-debug.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-51x-debug.yml) +[![Linux 5.1.0-musl](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-51x-musl.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-51x-musl.yml) [![Linux 32-bit 5.1.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-51x-32bit.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-51x-32bit.yml) [![Linux FP 5.1.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-51x-fp.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-51x-fp.yml) [![MinGW 5.1.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/mingw-51x.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/mingw-51x.yml) @@ -28,6 +30,7 @@ Multicore tests [![macOS-ARM64 5.2.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-arm64-520.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-arm64-520.yml) [![Linux 5.2.0-bytecode](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-520-bytecode.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-520-bytecode.yml) [![Linux 5.2.0-debug](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-520-debug.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-520-debug.yml) +[![Linux 5.2.0-musl](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-520-musl.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-520-musl.yml) [![Linux 32-bit 5.2.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-520-32bit.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-520-32bit.yml) [![Linux FP 5.2.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-520-fp.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-520-fp.yml) [![MinGW 5.2.0](https://github.com/ocaml-multicore/multicoretests/actions/workflows/mingw-520.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/mingw-520.yml) @@ -39,6 +42,7 @@ Multicore tests [![macOS-ARM64 5.3.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-arm64-530-trunk.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-arm64-530-trunk.yml) [![Linux 5.3.0+trunk-bytecode](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-530-trunk-bytecode.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-530-trunk-bytecode.yml) [![Linux 5.3.0+trunk-debug](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-530-trunk-debug.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-530-trunk-debug.yml) +[![Linux 5.3.0+trunk-musl](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-530-trunk-musl.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-530-trunk-musl.yml) [![Linux 32-bit 5.3.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-530-trunk-32bit.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-530-trunk-32bit.yml) [![Linux FP 5.3.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-530-trunk-fp.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-530-trunk-fp.yml) [![MinGW 5.3.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/mingw-530-trunk.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/mingw-530-trunk.yml) @@ -52,6 +56,7 @@ Multicore tests [![macOS-ARM64 5.4.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-arm64-540-trunk.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/macosx-arm64-540-trunk.yml) [![Linux 5.4.0+trunk-bytecode](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-540-trunk-bytecode.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-540-trunk-bytecode.yml) [![Linux 5.4.0+trunk-debug](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-540-trunk-debug.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-540-trunk-debug.yml) +[![Linux 5.4.0+trunk-musl](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-540-trunk-musl.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-540-trunk-musl.yml) [![Linux 32-bit 5.4.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-540-trunk-32bit.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-540-trunk-32bit.yml) [![Linux FP 5.4.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-540-trunk-fp.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/linux-540-trunk-fp.yml) [![MinGW 5.4.0+trunk](https://github.com/ocaml-multicore/multicoretests/actions/workflows/mingw-540-trunk.yml/badge.svg)](https://github.com/ocaml-multicore/multicoretests/actions/workflows/mingw-540-trunk.yml)