This repository was archived by the owner on Feb 6, 2025. It is now read-only.
Notify in the Readme that the repo is out of date #276
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
# List of test directories for the debug-s4096 and linux-O0 jobs. | |
# These directories are selected because of their tendencies to reach corner | |
# cases in the runtime system. | |
env: | |
PARALLEL_TESTS: parallel callback gc-roots weak-ephe-final | |
jobs: | |
# This job will do the initial build of the compiler (on linux). | |
# We then upload the compiler tree as a build artifact to enable re-use in | |
# subsequent jobs. | |
build: | |
runs-on: 'ubuntu-latest' | |
outputs: | |
manual_changed: ${{ steps.manual.outputs.manual_changed }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install libunwind | |
run: sudo apt install -y libunwind-dev | |
- name: Check for manual changes | |
id: manual | |
run: >- | |
tools/ci/actions/check-manual-modified.sh | |
'${{ github.ref }}' | |
'${{ github.event_name }}' | |
'${{ github.event.pull_request.base.ref }}' | |
'${{ github.event.pull_request.base.sha }}' | |
'${{ github.event.pull_request.head.ref }}' | |
'${{ github.event.pull_request.head.sha }}' | |
'${{ github.event.ref }}' | |
'${{ github.event.before }}' | |
'${{ github.event.ref }}' | |
'${{ github.event.after }}' | |
'${{ github.event.repository.full_name }}' | |
- name: Configure tree | |
run: | | |
MAKE_ARG=-j XARCH=x64 CONFIG_ARG='--enable-cmm-invariants --enable-dependency-generation --enable-native-toplevel --enable-tsan --enable-ocamltest' OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh configure | |
- name: Build | |
run: | | |
MAKE_ARG=-j bash -xe tools/ci/actions/runner.sh build | |
- name: Prepare Artifact | |
run: | | |
git config --local --unset http.https://github.com/.extraheader | |
tar --zstd -cf /tmp/sources.tar.zstd . | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: compiler | |
path: /tmp/sources.tar.zstd | |
retention-days: 1 | |
# Full testsuite run, and other sanity checks | |
normal: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: compiler | |
- name: Unpack Artifact | |
run: | | |
tar --zstd -xf sources.tar.zstd | |
rm -f sources.tar.zstd | |
- name: Packages | |
run: | | |
sudo apt-get update -y && sudo apt-get install -y texlive-latex-extra texlive-fonts-recommended hevea sass libunwind-dev | |
- name: Run the testsuite | |
run: | | |
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh test | |
- name: Build API Documentation | |
run: | | |
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh api-docs | |
- name: Install | |
run: | | |
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh install | |
- name: Build the manual | |
run: | | |
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh manual | |
if: needs.build.outputs.manual_changed == 'true' | |
- name: Other checks | |
run: | | |
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh other-checks | |
# MacOS build+testsuite run, and Linux O0 run. | |
others: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- name: linux-O0 | |
os: ubuntu-latest | |
config_arg: CFLAGS='-O0' | |
# - name: macos | |
# os: macos-latest | |
# config_arg: --enable-tsan | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: OS Dependencies | |
if: runner.os == 'MacOS' | |
run: brew install parallel libunwind libunwind-headers | |
- name: configure tree | |
run: | | |
CONFIG_ARG=${{ matrix.config_arg }} MAKE_ARG=-j XARCH=x64 bash -xe tools/ci/actions/runner.sh configure | |
- name: Build | |
run: | | |
MAKE_ARG=-j bash -xe tools/ci/actions/runner.sh build | |
- name: Run the testsuite | |
if: ${{ matrix.name != 'linux-O0' }} | |
run: | | |
bash -c 'SHOW_TIMINGS=1 tools/ci/actions/runner.sh test' | |
- name: Run the testsuite (linux-O0) | |
if: ${{ matrix.name == 'linux-O0' }} | |
env: | |
OCAMLRUNPARAM: v=0,V=1 | |
USE_RUNTIME: d | |
run: | | |
for dir in $PARALLEL_TESTS; do \ | |
bash -cxe "SHOW_TIMINGS=1 tools/ci/actions/runner.sh test_prefix $dir"; \ | |
done | |
# "extra" testsuite runs, reusing the previously built compiler tree. | |
# debug: running the full testsuite with the | |
# debug runtime and minor heap verification. | |
# debug-s4086: select testsuite run with the debug runtime and a small | |
# minor heap. | |
# extra: | |
# needs: build | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# id: | |
# - debug | |
# - debug-s4096 | |
# steps: | |
# - name: Download artifact | |
# uses: actions/download-artifact@v2 | |
# with: | |
# name: compiler | |
# - name: Unpack Artifact | |
# run: | | |
# tar --zstd -xf sources.tar.zstd | |
# rm -f sources.tar.zstd | |
# - name: Run the testsuite (debug runtime) | |
# if: ${{ matrix.id == 'debug' }} | |
# env: | |
# OCAMLRUNPARAM: v=0,V=1 | |
# USE_RUNTIME: d | |
# run: | | |
# bash -cxe "SHOW_TIMINGS=1 tools/ci/actions/runner.sh test" | |
# - name: Run the testsuite (s=4096, debug runtime) | |
# if: ${{ matrix.id == 'debug-s4096' }} | |
# env: | |
# OCAMLRUNPARAM: s=4096,v=0 | |
# USE_RUNTIME: d | |
# run: | | |
# for dir in $PARALLEL_TESTS; do \ | |
# bash -cxe "SHOW_TIMINGS=1 tools/ci/actions/runner.sh test_prefix $dir"; \ | |
# done |