chore: import upstream snapshot with attribution
build-deb / build (push) Has been cancelled
build / build (5.2.0+ox, ubuntu_x64_8_cores, 231c88c2e564fdca40e15e750aacad5fb0887435) (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 12:29:01 +08:00
commit f30f816e96
271 changed files with 286108 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
name: build-deb
on: push
jobs:
build:
runs-on: ubuntu_x64_8_cores
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install opam ocaml-dune debhelper devscripts llvm-20 llvm-20-dev lld
- name: Build packages
run: |
export PATH="/usr/lib/llvm-20/bin:$PATH"
DEBFULLNAME="Jane Street" DEBEMAIL=opensource-contacts@janestreet.com dch -b --newversion "$(git describe --tags | sed 's/^v//')+deb$(grep VERSION_ID /etc/os-release | cut -d'"' -f2)" -D unstable 'Building latest upstream'
dpkg-buildpackage -us -uc -b -j$(nproc)
# Because actions/upload-artifact will refuse to upload relative paths...
mv ../*.deb .
- uses: actions/upload-artifact@v6
with:
name: Packages
path: '*.deb'
if-no-files-found: error
- name: Upload to GitHub releases
if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '*.deb'
tag: ${{ github.ref }}
overwrite: true
file_glob: true
+85
View File
@@ -0,0 +1,85 @@
name: build
on:
- push
- pull_request
jobs:
build:
strategy:
matrix:
os:
- ubuntu_x64_8_cores
ocaml-version:
- '5.2.0+ox'
oxcaml-opam-commit:
- '231c88c2e564fdca40e15e750aacad5fb0887435'
runs-on: ${{ matrix.os }}
container:
image: alpine:latest
steps:
# This has to come first because the `actions/*` GitHub Actions require `node`,
# which isn't installed by default on this container image.
- name: "Install apk packages"
run: |
apk add autoconf bash bubblewrap build-base clang coreutils git libstdc++ \
libstdc++-dev libunwind-static linux-headers lld llvm20 llvm20-dev llvm20-static \
nodejs opam rsync upx zlib-static zstd-static
echo "PATH=/usr/lib/llvm20/bin:$PATH" >> "$GITHUB_ENV"
- name: Checkout code
uses: actions/checkout@v6
# This is necessary to avoid an error of the form 'fatal: detected dubious ownership in repository ...'
- run: git config --global --add safe.directory $(pwd)
- uses: actions/cache@v5
with:
path: ~/.opam
key: ${{ matrix.os }}-opam-${{ matrix.ocaml-version }}-${{ matrix.oxcaml-opam-commit }}-2
- name: Use OCaml ${{ matrix.ocaml-version }}
run: |
export OPAMYES=1
export OPAMJOBS=$(($(nproc) + 2))
export OPAMROOTISOK=1
echo "OPAMYES=1" >> "$GITHUB_ENV"
echo "OPAMJOBS=$OPAMJOBS" >> "$GITHUB_ENV"
echo "OPAMROOTISOK=$OPAMROOTISOK" >> "$GITHUB_ENV"
opam init --bare -yav https://github.com/ocaml/opam-repository.git
opam switch set ${{ matrix.ocaml-version }} 2>/dev/null || \
opam switch create ${{ matrix.ocaml-version }} --repos "ox=git+https://github.com/oxcaml/opam-repository.git#${{ matrix.oxcaml-opam-commit }},default"
- run: opam install . --deps-only --locked --with-test
- run: opam exec -- dune build @fmt
- run: opam exec -- make PROFILE=static
- run: opam exec -- dune runtest --profile=static
- name: Compress magic-trace executable
run: |
cp _build/install/default/bin/magic-trace .
chmod u+w magic-trace
ls -l magic-trace
strip magic-trace
upx -9 magic-trace
- uses: actions/upload-artifact@v6
with:
name: magic-trace
path: magic-trace
if-no-files-found: error
- name: Upload to GitHub releases
if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: magic-trace
asset_name: magic-trace
tag: ${{ github.ref }}
overwrite: true