|
| 1 | +name: flambda1 |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + runs-on: ${{ matrix.os }} |
| 8 | + |
| 9 | + strategy: |
| 10 | + matrix: |
| 11 | + os: [ubuntu-latest] |
| 12 | + |
| 13 | + env: |
| 14 | + J: "3" |
| 15 | + |
| 16 | + steps: |
| 17 | + - name: Checkout the Flambda backend repo |
| 18 | + uses: actions/checkout@master |
| 19 | + with: |
| 20 | + path: 'flambda_backend' |
| 21 | + |
| 22 | + - name: Cache dune build compiler install directory |
| 23 | + uses: actions/cache@v1 |
| 24 | + id: cache |
| 25 | + with: |
| 26 | + path: ${{ github.workspace }}/dune_build_compiler/_install |
| 27 | + key: ${{ matrix.os }}-cache-dune-build-compiler |
| 28 | + |
| 29 | + - name: Checkout OCaml 4.12 (dune build compiler) |
| 30 | + uses: actions/checkout@master |
| 31 | + if: steps.cache.outputs.cache-hit != 'true' |
| 32 | + with: |
| 33 | + repository: 'ocaml/ocaml' |
| 34 | + path: 'dune_build_compiler' |
| 35 | + ref: '4.12' |
| 36 | + |
| 37 | + - name: Build and install dune build compiler |
| 38 | + if: steps.cache.outputs.cache-hit != 'true' |
| 39 | + working-directory: dune_build_compiler |
| 40 | + run: | |
| 41 | + ./configure --prefix=$GITHUB_WORKSPACE/dune_build_compiler/_install |
| 42 | + make -j $J world.opt |
| 43 | + make install |
| 44 | +
|
| 45 | + - name: Checkout dune github repo |
| 46 | + uses: actions/checkout@master |
| 47 | + with: |
| 48 | + repository: 'ocaml-flambda/dune' |
| 49 | + ref: 'special_dune' |
| 50 | + path: 'dune' |
| 51 | + |
| 52 | + - name: Build dune |
| 53 | + working-directory: dune |
| 54 | + run: | |
| 55 | + PATH=$GITHUB_WORKSPACE/dune_build_compiler/_install/bin:$PATH make release |
| 56 | +
|
| 57 | + - name: Run autoconf for Flambda backend |
| 58 | + working-directory: flambda_backend |
| 59 | + run: autoconf |
| 60 | + |
| 61 | + - name: Configure Flambda backend (Flambda 1 mode) |
| 62 | + working-directory: flambda_backend |
| 63 | + run: | |
| 64 | + ./configure \ |
| 65 | + --prefix=$GITHUB_WORKSPACE/_install \ |
| 66 | + --enable-middle-end=flambda \ |
| 67 | + --with-dune=$GITHUB_WORKSPACE/dune/dune.exe |
| 68 | +
|
| 69 | + - name: Build, install and test Flambda backend (Flambda 1 mode) |
| 70 | + working-directory: flambda_backend |
| 71 | + run: make -j $J ci |
0 commit comments