|
53 | 53 | -DEXTRA_CXXFLAGS=-flto=full |
54 | 54 | with_pgo: true |
55 | 55 |
|
| 56 | + - job_name: Alpine musl x86_64 |
| 57 | + os: ubuntu-latest |
| 58 | + container_image: alpine:3.20 |
| 59 | + arch: x86_64 |
| 60 | + bootstrap_cmake_flags: -DBUILD_LTO_LIBS=ON |
| 61 | + # TSan and XRay do not work. |
| 62 | + extra_cmake_flags: >- |
| 63 | + -DBUILD_LTO_LIBS=ON |
| 64 | + -DLLVM_IS_SHARED=OFF |
| 65 | + -DLDC_ENABLE_PLUGINS=OFF |
| 66 | + -DLDC_DYNAMIC_COMPILE=OFF |
| 67 | + -DLDC_INSTALL_LTOPLUGIN=OFF |
| 68 | + -DCOMPILER_RT_LIBDIR_OS=linux |
| 69 | + -DLDC_INSTALL_LLVM_RUNTIME_LIBS_ARCH=x86_64 |
| 70 | + -DTEST_COMPILER_RT_LIBRARIES="profile;lsan;asan;msan;fuzzer" |
| 71 | + -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ |
| 72 | + -DLDC_FULLY_STATIC=ON |
| 73 | + -DD_COMPILER_FLAGS="-O -flto=full" |
| 74 | + # FIXME: -defaultlib=phobos2-ldc-lto,druntime-ldc-lto |
| 75 | + with_pgo: false |
| 76 | + |
56 | 77 | - job_name: macOS x86_64 |
57 | 78 | os: macos-13 |
58 | 79 | arch: x86_64 |
@@ -108,18 +129,33 @@ jobs: |
108 | 129 | env: |
109 | 130 | MACOSX_DEPLOYMENT_TARGET: ${{ matrix.arch == 'arm64' && '11.0' || '10.12' }} |
110 | 131 | steps: |
111 | | - - name: 'Container: Install git and sudo' |
| 132 | + - name: 'Set up Linux container' |
112 | 133 | if: matrix.container_image |
113 | | - shell: bash |
114 | 134 | run: | |
115 | 135 | set -eux |
116 | | - apt-get -q update |
117 | | - DEBIAN_FRONTEND=noninteractive apt-get -yq install git-core sudo |
| 136 | + if type -P apt-get &>/dev/null; then |
| 137 | + # Ubuntu: pre-install git and sudo |
| 138 | + apt-get -q update |
| 139 | + DEBIAN_FRONTEND=noninteractive apt-get -yq install git-core sudo |
| 140 | + else |
| 141 | + # set up Alpine container |
| 142 | + apk add \ |
| 143 | + git cmake ninja-is-really-ninja g++ ldc llvm-dev llvm-static compiler-rt \ |
| 144 | + libxml2-static zstd-static zlib-static \ |
| 145 | + bash grep diffutils make curl 7zip perl |
| 146 | + # create missing 7za symlink |
| 147 | + ln -s 7z /usr/bin/7za |
| 148 | + # create ../llvm symlink to distro LLVM (no prebuilt LDC-LLVM for musl) |
| 149 | + ln -s /usr/lib/llvm17 $(dirname $(pwd))/llvm |
| 150 | + ../llvm/bin/llvm-config --version |
| 151 | + fi |
118 | 152 | - uses: actions/checkout@v4 |
119 | 153 | with: |
120 | 154 | submodules: true |
121 | 155 | fetch-depth: 50 |
122 | 156 | - name: Install prerequisites |
| 157 | + if: | |
| 158 | + !startsWith(matrix.container_image, 'alpine') |
123 | 159 | uses: ./.github/actions/1-setup |
124 | 160 | with: |
125 | 161 | llvm_version: ${{ matrix.llvm_version || env.LLVM_VERSION }} |
@@ -194,6 +230,7 @@ jobs: |
194 | 230 | uses: ./.github/actions/7-package |
195 | 231 | with: |
196 | 232 | arch: ${{ matrix.arch }} |
| 233 | + os: ${{ startsWith(matrix.container_image, 'alpine') && 'alpine' || '' }} |
197 | 234 |
|
198 | 235 |
|
199 | 236 | # Cross-compilation jobs for non-native targets. |
|
0 commit comments