Skip to content

Commit

Permalink
Split CI workflows (ocaml-flambda#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshinwell committed Jul 26, 2021
1 parent bea6617 commit 1a63f01
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 21 deletions.
22 changes: 1 addition & 21 deletions .github/workflows/main.yml → .github/workflows/closure.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: main
name: closure

on: [push, pull_request]

Expand Down Expand Up @@ -69,23 +69,3 @@ jobs:
- name: Build, install and test Flambda backend (Closure mode)
working-directory: flambda_backend
run: make -j $J ci

- name: Clean Flambda backend tree
working-directory: flambda_backend
run: git clean -dfx

- name: Run autoconf for Flambda backend
working-directory: flambda_backend
run: autoconf

- name: Configure Flambda backend (Flambda mode)
working-directory: flambda_backend
run: |
./configure \
--prefix=$GITHUB_WORKSPACE/_install \
--enable-middle-end=flambda \
--with-dune=$GITHUB_WORKSPACE/dune/dune.exe
- name: Build, install and test Flambda backend (Flambda mode)
working-directory: flambda_backend
run: make -j $J ci
71 changes: 71 additions & 0 deletions .github/workflows/flambda1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: flambda1

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]

env:
J: "3"

steps:
- name: Checkout the Flambda backend repo
uses: actions/checkout@master
with:
path: 'flambda_backend'

- name: Cache dune build compiler install directory
uses: actions/cache@v1
id: cache
with:
path: ${{ github.workspace }}/dune_build_compiler/_install
key: ${{ matrix.os }}-cache-dune-build-compiler

- name: Checkout OCaml 4.12 (dune build compiler)
uses: actions/checkout@master
if: steps.cache.outputs.cache-hit != 'true'
with:
repository: 'ocaml/ocaml'
path: 'dune_build_compiler'
ref: '4.12'

- name: Build and install dune build compiler
if: steps.cache.outputs.cache-hit != 'true'
working-directory: dune_build_compiler
run: |
./configure --prefix=$GITHUB_WORKSPACE/dune_build_compiler/_install
make -j $J world.opt
make install
- name: Checkout dune github repo
uses: actions/checkout@master
with:
repository: 'ocaml-flambda/dune'
ref: 'special_dune'
path: 'dune'

- name: Build dune
working-directory: dune
run: |
PATH=$GITHUB_WORKSPACE/dune_build_compiler/_install/bin:$PATH make release
- name: Run autoconf for Flambda backend
working-directory: flambda_backend
run: autoconf

- name: Configure Flambda backend (Flambda 1 mode)
working-directory: flambda_backend
run: |
./configure \
--prefix=$GITHUB_WORKSPACE/_install \
--enable-middle-end=flambda \
--with-dune=$GITHUB_WORKSPACE/dune/dune.exe
- name: Build, install and test Flambda backend (Flambda 1 mode)
working-directory: flambda_backend
run: make -j $J ci

0 comments on commit 1a63f01

Please sign in to comment.