Skip to content

Resolve conflicts in configuration and dune files (#168) #826

Resolve conflicts in configuration and dune files (#168)

Resolve conflicts in configuration and dune files (#168) #826

Workflow file for this run

<<<<<<< HEAD
name: build

Check failure on line 2 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yml

Invalid workflow file

You have an error in your yaml syntax on line 2
on: [push, pull_request]
||||||| merged common ancestors
name: Build
on: [push, pull_request]
=======
name: Build
on:
push:
branches:
- '4.**'
- '5.**'
- 'trunk'
pull_request:
# Restrict the GITHUB_TOKEN
permissions: {}
# 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
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
# Concurrent workflows are grouped by the PR or branch that triggered them
# (github.ref) and the name of the workflow (github.workflow). The
# 'cancel-in-progress' option then make sure that only one workflow is running
# at a time. This doesn't prevent new jobs from running, rather it cancels
# already running jobs before scheduling new jobs.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'pull_request' || github.sha }}
cancel-in-progress: true
>>>>>>> ocaml/5.1
jobs:
<<<<<<< HEAD
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: closure-local
config: --enable-stack-allocation
os: ubuntu-latest
ocamlparam: ''
check_arch: true
# - name: flambda-local
# config: --enable-flambda --enable-stack-allocation
# os: ubuntu-latest
# use_runtime: d
# ocamlrunparam: "v=0,V=1"
env:
J: "3"
||||||| merged common ancestors
no-naked-pointers:
runs-on: ubuntu-latest
=======
# This job will do the initial build of the compiler (on linux), with flambda on.
# 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@v3
with:
persist-credentials: false
- 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-flambda --enable-cmm-invariants --enable-dependency-generation --enable-native-toplevel' 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: tar --zstd -cf /tmp/sources.tar.zstd .
- name: Upload Artifact
uses: actions/upload-artifact@v3
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
>>>>>>> ocaml/5.1
steps:
<<<<<<< HEAD
- name: Install GNU parallel
if: matrix.os == 'macos-latest'
run: HOMEBREW_NO_INSTALL_CLEANUP=TRUE brew install parallel
- name: Checkout the ocaml-jst repo
uses: actions/checkout@master
with:
path: 'ocaml-jst'
- name: Cache OCaml 4.14 and dune
uses: actions/cache@v1
id: cache
with:
path: ${{ github.workspace }}/ocaml-414/_install
key: ${{ matrix.os }}-cache-ocaml-414-dune-361-bits-${{ matrix.boot_cachekey }}
- name: Checkout OCaml 4.14
uses: actions/checkout@master
if: steps.cache.outputs.cache-hit != 'true'
with:
repository: 'ocaml/ocaml'
path: 'ocaml-414'
ref: '4.14'
- name: Build OCaml 4.14
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ocaml-414
run: |
export PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH
./configure --prefix=$GITHUB_WORKSPACE/ocaml-414/_install ${{ matrix.boot_config }}
make -j $J world.opt
make install
# Remove unneeded parts to shrink cache file
rm -rf $GITHUB_WORKSPACE/ocaml-414/_install/{lib/ocaml/compiler-libs,lib/ocaml/expunge,bin/*.byte}
- name: Checkout dune github repo
uses: actions/checkout@master
if: steps.cache.outputs.cache-hit != 'true'
with:
repository: 'ocaml/dune'
ref: '3.6.1'
path: 'dune'
- name: Build dune
working-directory: dune
if: steps.cache.outputs.cache-hit != 'true'
run: |
PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH make release
cp _boot/dune.exe $GITHUB_WORKSPACE/ocaml-414/_install/bin/dune
- name: Configure OCaml
working-directory: ocaml-jst
run: |
export PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH
autoconf
./configure \
--prefix=$GITHUB_WORKSPACE/_install \
${{ matrix.config }}
- name: Build, install and test ocaml-jst
working-directory: ocaml-jst
run: |
export PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH
make -f Makefile.jst runtest-upstream
env:
BUILD_OCAMLPARAM: ${{ matrix.ocamlparam }}
OCAMLRUNPARAM: ${{ matrix.ocamlrunparam }}
USE_RUNTIME: ${{ matrix.use_runtime }}
||||||| merged common ancestors
- name: Checkout
uses: actions/checkout@v2
- name: configure tree
run: ./configure --disable-naked-pointers --disable-stdlib-manpages --disable-dependency-generation --enable-ocamltest
- name: Build
run: |
make -j world.opt
- name: Run the testsuite
run: |
make -C testsuite USE_RUNTIME=d all
i386-static:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Packages
run: |
sudo apt-get update -y && sudo apt-get install -y gcc-multilib gfortran-multilib
- name: configure tree
run: |
XARCH=i386 CONFIG_ARG='--disable-stdlib-manpages --disable-shared --enable-cmm-invariants' bash -xe tools/ci/actions/runner.sh configure
- name: Build
run: |
bash -xe tools/ci/actions/runner.sh build
- name: Run the testsuite
run: |
bash -xe tools/ci/actions/runner.sh test
- name: Install
run: |
bash -xe tools/ci/actions/runner.sh install
- name: Other checks
run: |
bash -xe tools/ci/actions/runner.sh other-checks
full-flambda:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 50
- name: Packages
run: |
sudo apt-get update -y && sudo apt-get install -y texlive-latex-extra texlive-fonts-recommended hevea sass
# Ensure that make distclean can be run from an empty tree
- name: distclean
run: |
MAKE_ARG=-j make distclean
- name: configure tree
run: |
MAKE_ARG=-j XARCH=x64 CONFIG_ARG='--enable-flambda --enable-cmm-invariants --enable-dependency-generation --enable-native-toplevel' OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh configure
- name: Build
run: |
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh build
- 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: 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: Build the manual
run: |
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh manual
# Temporarily disabled 23-Apr-2021 while Dune isn't building
if: steps.manual.outputs.changed == 'disabled'
- name: Other checks
run: |
MAKE_ARG=-j OCAMLRUNPARAM=b,v=0 bash -xe tools/ci/actions/runner.sh other-checks
=======
- name: Download Artifact
uses: actions/download-artifact@v3
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
- 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
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: OS Dependencies
if: runner.os == 'MacOS'
run: brew install parallel
- 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
i386:
runs-on: ubuntu-latest
container:
image: i386/ubuntu:18.04
options: --platform linux/i386 --user root
steps:
- name: OS Dependencies
run: |
apt-get update
apt-get install -y git gcc make parallel
- name: Checkout
# See https://github.com/actions/checkout/issues/334
uses: actions/checkout@v1
- name: configure tree
run: |
MAKE_ARG=-j XARCH=i386 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
run: |
bash -xe tools/ci/actions/runner.sh test
# "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@v3
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
>>>>>>> ocaml/5.1