Skip to content

Commit fe9efa6

Browse files
committed
Relax things to *mostly* statically linked
Signed-off-by: Kevin Svetlitski <ksvetlitski@janestreet.com>
1 parent a798395 commit fe9efa6

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
os:
12-
- ubuntu-latest
12+
- ubuntu_x64_8_cores
1313
ocaml-version:
1414
- '5.2.0+ox'
1515

@@ -21,12 +21,12 @@ jobs:
2121
- uses: actions/cache@v4
2222
with:
2323
path: ~/.opam
24-
key: ${{ matrix.os }}-opam-${{ matrix.ocaml-version }}-flambda-musl-v6
24+
key: ${{ matrix.os }}-opam-${{ matrix.ocaml-version }}
2525

2626
- name: "Install apt packages"
2727
run: |
2828
sudo apt-get update
29-
sudo apt-get install bubblewrap musl-tools libucl1 linux-headers-generic
29+
sudo apt-get install bubblewrap libucl1 linux-headers-generic
3030
sudo apt-get autoremove
3131
sudo apt-get clean
3232
echo 'Removing extraneous default packages to free up disk space'
@@ -40,39 +40,37 @@ jobs:
4040
sudo dpkg -i upx-ucl_3.96-2_amd64.deb
4141
rm -f upx-ucl_3.96-2_amd64.deb
4242
43-
- name: Build zlib with musl
43+
- name: Build zlib
4444
run: |
45-
mkdir musl-zlib
46-
curl -L https://zlib.net/zlib-1.3.1.tar.gz | tar -xz -C musl-zlib --strip-components=1
47-
cd musl-zlib
48-
CC=musl-gcc ./configure --libdir=/usr/lib/x86_64-linux-musl --includedir=/usr/include/x86_64-linux-musl
45+
mkdir zlib
46+
curl -L https://zlib.net/zlib-1.3.1.tar.gz | tar -xz -C zlib --strip-components=1
47+
cd zlib
48+
./configure
4949
make -j$(nproc)
5050
sudo make install
5151
cd ..
52-
rm -rf musl-zlib
52+
rm -rf zlib
5353
54-
- name: Build zstd with musl
54+
- name: Build zstd
5555
run: |
56-
mkdir musl-zstd
56+
mkdir zstd
5757
curl -L https://github.com/facebook/zstd/releases/download/v1.5.5/zstd-1.5.5.tar.gz | \
58-
tar -xz -C musl-zstd --strip-components=1
59-
cd musl-zstd
60-
CC=musl-gcc make -j$(nproc)
61-
sudo make INCLUDEDIR=/usr/include/x86_64-linux-musl LIBDIR=/usr/lib/x86_64-linux-musl install
58+
tar -xz -C zstd --strip-components=1
59+
cd zstd
60+
make -j$(nproc)
61+
sudo make install
6262
cd ..
63-
rm -rf musl-zstd
63+
rm -rf zstd
6464
6565
- name: Use OCaml ${{ matrix.ocaml-version }}
6666
run: |
67-
sudo wget -O /usr/local/bin/opam https://github.com/ocaml/opam/releases/download/2.1.2/opam-2.1.2-x86_64-linux
67+
sudo wget -O /usr/local/bin/opam https://github.com/ocaml/opam/releases/download/2.5.0/opam-2.5.0-x86_64-linux
6868
sudo chmod a+x /usr/local/bin/opam
6969
7070
export OPAMYES=1
7171
export OPAMJOBS=$(($(nproc) + 2))
72-
export CC=musl-gcc
7372
echo "OPAMYES=1" >> "$GITHUB_ENV"
7473
echo "OPAMJOBS=$OPAMJOBS" >> "$GITHUB_ENV"
75-
echo "CC=musl-gcc" >> "$GITHUB_ENV"
7674
7775
opam init --bare -yav https://github.com/ocaml/opam-repository.git
7876
opam switch create ${{ matrix.ocaml-version }} --repos ox=git+https://github.com/oxcaml/opam-repository.git,default

dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(env
22
(static
33
(flags
4-
(:standard -cclib -static))))
4+
(:standard -cclib -Wl,-Bstatic -cclib -lz -cclib -lzstd -cclib -Wl,-Bdynamic))))
55

66
(vendored_dirs vendor)

0 commit comments

Comments
 (0)