Skip to content

Commit

Permalink
Merge branch 'refs/heads/upstream-HEAD' into repo-HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Delphix Engineering committed Oct 5, 2024
2 parents 2c2aabd + f20a223 commit 2d5e222
Show file tree
Hide file tree
Showing 677 changed files with 6,900 additions and 5,146 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- cron: '0 0 * * *'
release:
types: [ published ]
workflow_dispatch:

jobs:
build-tarballs:
Expand Down Expand Up @@ -39,7 +40,7 @@ jobs:
run: ./dist.sh ${{ matrix.target }}

- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: tarballs
name: ${{ matrix.target }}
path: mold-*.tar.gz
3 changes: 2 additions & 1 deletion .github/workflows/build-x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build x86 tarball
on:
push:
branches: [ main ]
workflow_dispatch:

jobs:
build-tarball:
Expand Down Expand Up @@ -30,7 +31,7 @@ jobs:
run: ./dist.sh

- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: tarball
path: mold-*.tar.gz
103 changes: 59 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,30 @@
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
jobs:
build-clang:
build-sanitizers:
strategy:
matrix:
target:
# Disable PCH for the default configuration. This prevents relying on implicit includes.
- '-DCMAKE_DISABLE_PRECOMPILE_HEADERS=On'
- ''
- '-DMOLD_USE_ASAN=On'
- '-DMOLD_USE_TSAN=On'
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: rui314/setup-mold@staging
- name: install-build-deps
run: sudo ./install-build-deps.sh
- name: ccache
uses: hendrikmuhs/ccache-action@v1
- run: sudo ./install-build-deps.sh
- name: build
run: |
echo "/usr/lib/ccache:/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
sudo apt-get install -y clang++-12
sudo apt-get install -y clang-18 clang gcc-multilib gdb dwarfdump zstd
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++-12 ${{ matrix.target }} ..
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 ${{ matrix.target }} ..
cmake --build . -j$(nproc)
- name: test
run: |
cd build
ctest -j$(nproc)
- run: ctest --test-dir build -j$(nproc)
- name: archive test results
uses: actions/upload-artifact@v3
if: failure()
Expand All @@ -44,8 +34,8 @@ jobs:
build
!build/CMakeFiles
build-gcc:
runs-on: ubuntu-20.04
build-multi-archs:
runs-on: ubuntu-latest
container: gcc:11.1.0
steps:
- uses: actions/checkout@v3
Expand All @@ -72,34 +62,29 @@ jobs:
# Install a LoongArch toolchain
mkdir /larch
wget -O- -q https://github.com/loongson/build-tools/releases/download/2023.08.08/CLFS-loongarch64-8.1-x86_64-cross-tools-gcc-glibc.tar.xz | tar -C /larch --strip-components=1 --xz -xf -
wget -O- -q https://github.com/loongson/build-tools/releases/download/2024.08.08/x86_64-cross-tools-loongarch64-binutils_2.43-gcc_14.2.0-glibc_2.40.tar.xz | tar -C /larch --strip-components=1 --xz -xf -
cp -r /larch/loongarch64-unknown-linux-gnu/lib/* /larch/target/lib64
ln -sf /larch/target /usr/loongarch64-linux-gnu
cp -r /larch/loongarch64-unknown-linux-gnu/lib/* /usr/loongarch64-linux-gnu/lib64/
for i in objdump objcopy strip; do
for i in gcc g++ objdump objcopy strip; do
ln -sf /larch/bin/loongarch64-unknown-linux-gnu-$i /usr/bin/loongarch64-linux-gnu-$i
done
echo '/larch/bin/loongarch64-unknown-linux-gnu-gcc -L/larch/loongarch64-unknown-linux-gnu "$@"' > /usr/bin/loongarch64-linux-gnu-gcc
echo '/larch/bin/loongarch64-unknown-linux-gnu-g++ -L/larch/loongarch64-unknown-linux-gnu "$@"' > /usr/bin/loongarch64-linux-gnu-g++
chmod 755 /usr/bin/loongarch64-linux-gnu-{gcc,g++}
wget -O /usr/local/bin/qemu-loongarch64 -q https://github.com/loongson/build-tools/releases/download/2023.08.08/qemu-loongarch64
chmod 755 /usr/local/bin/qemu-loongarch64
- name: ccache
uses: hendrikmuhs/ccache-action@v1
# Install Intel SDE CPU emulator for CET-related tests
mkdir /sde
wget -O- -q https://downloadmirror.intel.com/813591/sde-external-9.33.0-2024-01-07-lin.tar.xz | tar -C /sde --strip-components=1 --xz -xf -
ln -s /sde/sde /usr/bin
- name: build
run: |
echo "/usr/lib/ccache:/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
mkdir build
cd build
cmake ..
cmake --build . -j$(nproc)
- name: test
run: |
cd build
ctest -j$(nproc)
- run: ctest --test-dir build -j$(nproc)
- name: archive test results
uses: actions/upload-artifact@v3
if: failure()
Expand All @@ -109,24 +94,38 @@ jobs:
build
!build/CMakeFiles
build-macos:
runs-on: macos-11
build-distros:
strategy:
matrix:
target:
# Disable PCH for the default configuration. This prevents relying on implicit includes.
- '-DCMAKE_DISABLE_PRECOMPILE_HEADERS=On'
- '-DMOLD_USE_ASAN=On'
distro:
- alpine
- archlinux
- fedora
- gentoo/stage3
- opensuse/tumbleweed
- ubuntu:22.04
runs-on: ubuntu-latest
container: ${{ matrix.distro }}
steps:
- uses: actions/checkout@v2
- run: ./install-build-deps.sh
- name: build
run: |
mkdir build
cd build
cmake ..
cmake --build . -j$(nproc)
- run: ctest --test-dir build -j$(nproc)

build-macos:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: ccache
uses: hendrikmuhs/ccache-action@v1
- name: build
run: |
echo "/usr/lib/ccache:/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
mkdir build
cd build
cmake ${{ matrix.target }} ..
cmake ..
cmake --build . -j$(sysctl -n hw.physicalcpu)
build-windows:
Expand Down Expand Up @@ -155,5 +154,21 @@ jobs:
run: |
mkdir build
cd build
cmake -GNinja -DMOLD_USE_MIMALLOC=OFF -DMOLD_USE_SYSTEM_TBB=ON -DMOLD_USE_MOLD=OFF ..
cmake -GNinja -DMOLD_USE_MIMALLOC=OFF -DMOLD_USE_SYSTEM_TBB=ON ..
cmake --build . -j $(nproc)
build-freebsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build and test
uses: vmactions/freebsd-vm@v1
with:
usesh: true
run: |
./install-build-deps.sh
mkdir build
cd build
cmake ..
cmake --build . -j$(nproc)
ctest -j$(nproc)
5 changes: 2 additions & 3 deletions .github/workflows/update-manpage.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This file is generated by ChatGPT

name: Update manpage

on:
Expand All @@ -8,6 +6,7 @@ on:
- 'docs/mold.md'
branches:
- main
workflow_dispatch:

jobs:
update-manpage:
Expand All @@ -18,7 +17,7 @@ jobs:
uses: actions/checkout@v2

- name: Install ronn
run: sudo apt-get install -y ronn
run: sudo apt-get update && sudo apt-get install -y ronn

- name: Generate mold.1 from mold.md
run: ronn --roff docs/mold.md
Expand Down
Loading

0 comments on commit 2d5e222

Please sign in to comment.