|
| 1 | +name: Build and run everything |
| 2 | +on: |
| 3 | + workflow_call: |
| 4 | + inputs: |
| 5 | + platform: |
| 6 | + description: 'Base container image to build on' |
| 7 | + required: true |
| 8 | + type: string |
| 9 | + |
| 10 | +jobs: |
| 11 | + build-base-with-docker: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - name: Check out repository code |
| 15 | + uses: actions/checkout@v3 |
| 16 | + |
| 17 | + - name: Set up Docker Buildx |
| 18 | + uses: docker/setup-buildx-action@v2 |
| 19 | + |
| 20 | + - name: Build benchmarks in Docker |
| 21 | + id: docker_build |
| 22 | + uses: docker/build-push-action@v4 |
| 23 | + with: |
| 24 | + context: . |
| 25 | + file: Dockerfile |
| 26 | + push: false |
| 27 | + tags: bench |
| 28 | + target: bench-env |
| 29 | + build-args: | |
| 30 | + platform=${{ inputs.platform }} |
| 31 | + cache-from: type=gha,scope=buildkit_${{ inputs.platform }} |
| 32 | + cache-to: type=gha,mode=max,scope=buildkit_${{ inputs.platform }} |
| 33 | + |
| 34 | + build-and-benchmark-allocator: |
| 35 | + runs-on: ubuntu-latest |
| 36 | + |
| 37 | + needs: build-base-with-docker |
| 38 | + strategy: |
| 39 | + matrix: |
| 40 | + allocator: [mi, sn, je] |
| 41 | + fail-fast: false |
| 42 | + steps: |
| 43 | + - name: Check out repository code |
| 44 | + uses: actions/checkout@v3 |
| 45 | + |
| 46 | + - name: Set up Docker Buildx |
| 47 | + uses: docker/setup-buildx-action@v2 |
| 48 | + |
| 49 | + - name: Build allocator and run benchmarks in Docker |
| 50 | + id: docker_build |
| 51 | + uses: docker/build-push-action@v4 |
| 52 | + with: |
| 53 | + context: . |
| 54 | + file: Dockerfile |
| 55 | + push: false |
| 56 | + target: benchmark |
| 57 | + build-args: | |
| 58 | + platform=${{ inputs.platform }} |
| 59 | + allocator=${{ matrix.allocator }} |
| 60 | + benchs=allt |
| 61 | + repeats=1 |
| 62 | + cache-from: type=gha,scope=buildkit_${{ inputs.platform }} |
| 63 | + |
| 64 | + # build-all-alpine: |
| 65 | + # runs-on: ubuntu-latest |
| 66 | + # container: |
| 67 | + # image: alpine:latest |
| 68 | + # steps: |
| 69 | + # - name: Check out repository code |
| 70 | + # uses: actions/checkout@v3 |
| 71 | + # - name: Install bash |
| 72 | + # run: apk add bash git |
| 73 | + # - name: Silence some git warnings |
| 74 | + # run: | |
| 75 | + # git config --global advice.detachedHead false |
| 76 | + # git config --global init.defaultBranch main |
| 77 | + # - name: Install and build all benchmarks and allocators |
| 78 | + # # dh: glibc-specific |
| 79 | + # # fg: Uses execinfo.h, which is a GNU extension |
| 80 | + # # gd: ? |
| 81 | + # # hd: glibc-specific |
| 82 | + # # lf: crashes redis server |
| 83 | + # # lt: return type 'struct mallinfo' is incomplete |
| 84 | + # # mesh/nomesh: infinite loop? |
| 85 | + # # pa: can't setup depot_tools and goma |
| 86 | + # # sm: ../src/supermalloc.h:10:31: error: expected initializer before '__THROW' |
| 87 | + # # tcg: [...] specifies less restrictive attribute than its target [...] |
| 88 | + # # lp: /__w/mimalloc-bench/mimalloc-bench/extern/lp/Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c:218:22: error: call to undeclared function 'pthread_getname_np'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] |
| 89 | + # # rp: rpmalloc/rpmalloc.c:980:9: error: unsafe pointer arithmetic [-Werror,-Wunsafe-buffer-usage] |
| 90 | + # run: ./build-bench-env.sh all no-dh no-hd no-sm no-mesh no-nomesh no-pa no-gd no-fg no-lf no-lt no-tcg no-lp no-rp |
| 91 | + # - name: Run everything. |
| 92 | + # run: | |
| 93 | + # cd out/bench |
| 94 | + # ../../bench.sh alla allt |
| 95 | + # build-all-ubuntu: |
| 96 | + # runs-on: ubuntu-latest |
| 97 | + # steps: |
| 98 | + # - name: Check out repository code |
| 99 | + # uses: actions/checkout@v3 |
| 100 | + # - name: Silence some git warnings |
| 101 | + # run: | |
| 102 | + # git config --global advice.detachedHead false |
| 103 | + # git config --global init.defaultBranch main |
| 104 | + # - name: Install and build all benchmarks and allocators |
| 105 | + # # fg: crashes on redis |
| 106 | + # # gd: infinite loop in the redis benchmark |
| 107 | + # # lt: breaks on sh8benchN |
| 108 | + # # lf: crashes redis server |
| 109 | + # # ff: crashes on modern ubuntu: https://github.com/bwickman97/ffmalloc/issues/5 |
| 110 | + # # hoard: crashes on rocksdb |
| 111 | + # # pa: python3: can't open file '/__w/mimalloc-bench/mimalloc-bench/extern/pa/partition_alloc_builder/tools/rust/update_rust.py': [Errno 2] No such file or directory |
| 112 | + # # sn: /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: error: call to consteval function 'std::chrono::hh_mm_ss::_S_fractional_width' is not a constant expression |
| 113 | + # # lp: /home/runner/work/mimalloc-bench/mimalloc-bench/extern/lp/Source/bmalloc/libpas/src/libpas/hotbit_heap_inlines.h:64:51: error: too few arguments to function call, expected 3, have 2 |
| 114 | + # # tcg: ERROR: Error computing the main repository mapping: protobuf@29.0 depends on rules_fuzzing@0.5.2 with compatibility level 0, but <root> depends on rules_fuzzing@0.5.1 with compatibility level 1 which is different |
| 115 | + # run: ./build-bench-env.sh all no-lean no-gd no-ff no-fg no-lt no-lf no-hd no-pa no-sn no-lp no-tcg |
| 116 | + # - name: Run everything. |
| 117 | + # run: | |
| 118 | + # cd out/bench |
| 119 | + # ../../bench.sh alla allt |
| 120 | + # build-all-fedora: |
| 121 | + # runs-on: ubuntu-latest |
| 122 | + # container: |
| 123 | + # image: fedora:latest |
| 124 | + # steps: |
| 125 | + # - name: Check out repository code |
| 126 | + # uses: actions/checkout@v3 |
| 127 | + # - name: Install git |
| 128 | + # run: sudo dnf -y --quiet --nodocs install git |
| 129 | + # - name: Silence some git warnings |
| 130 | + # run: | |
| 131 | + # git config --global advice.detachedHead false |
| 132 | + # git config --global init.defaultBranch main |
| 133 | + # - name: Install and build all benchmarks and allocators |
| 134 | + # # gd: infinite loop in the redis benchmark |
| 135 | + # # mesh/nomesh: error: '__malloc_hook' was not declared in this scope; |
| 136 | + # # mi: error: '__malloc_hook' was not declared in this scope; |
| 137 | + # # rp: mixing declarations and code is incompatible with standards before C99 |
| 138 | + # # lf: crashes redis server |
| 139 | + # # fg: crashes redis server |
| 140 | + # # pa: python3: can't open file '/__w/mimalloc-bench/mimalloc-bench/extern/pa/partition_alloc_builder/tools/rust/update_rust.py': [Errno 2] No such file or directory |
| 141 | + # # lp: /__w/mimalloc-bench/mimalloc-bench/extern/lp/Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c:218:22: error: call to undeclared function 'pthread_getname_np'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] |
| 142 | + # # tcg: https://github.com/bazelbuild/bazel/issues/19295 bazel5 is required but unavailable |
| 143 | + # run: ./build-bench-env.sh all no-lean no-mi no-mesh no-nomesh no-gd no-rp no-lf no-fg no-pa no-lp no-sh8 no-tcg |
| 144 | + # - name: Run everything. |
| 145 | + # run: | |
| 146 | + # cd out/bench |
| 147 | + # ../../bench.sh alla allt |
| 148 | + # build-all-osx: |
| 149 | + # runs-on: macos-11 |
| 150 | + # steps: |
| 151 | + # - name: Check out repository code |
| 152 | + # uses: actions/checkout@v3 |
| 153 | + # - name: Silence some git warnings |
| 154 | + # run: | |
| 155 | + # git config --global advice.detachedHead false |
| 156 | + # git config --global init.defaultBranch main |
| 157 | + # - name: Install and build all benchmarks and allocators |
| 158 | + # # ff:ffmalloc.c:1140:14: error: implicit declaration of function 'sched_getcpu' is invalid in C99 [-Werror,-Wimplicit-function-declaration] |
| 159 | + # # fg: unknown type name 'pthread_spinlock_t'; did you mean 'pthread_rwlock_t'? |
| 160 | + # # gd: so many errors |
| 161 | + # # pa: ninja: error: '../../buildtools/third_party/libc++/trunk/src/utility.cpp', needed by 'obj/buildtools/third_party/libc++/libc++/utility.o', missing and no known rule to make it |
| 162 | + # # lp: /home/runner/work/mimalloc-bench/mimalloc-bench/extern/lp/Source/bmalloc/libpas/src/libpas/hotbit_heap_inlines.h:64:51: error: too few arguments to function call, expected 3, have 2 |
| 163 | + # run: ./build-bench-env.sh all no-lean no-gd no-ff no-fg no-pa no-lp |
| 164 | + # - name: Run everything. |
| 165 | + # run: | |
| 166 | + # cd out/bench |
| 167 | + # ../../bench.sh alla allt |
0 commit comments