Skip to content

Commit

Permalink
Move the CI jobs from 4.12 to 4.14. (ocaml#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
xclerc authored Dec 28, 2022
1 parent a09392d commit 1569b58
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,58 +46,58 @@ jobs:
with:
path: 'ocaml-jst'

- name: Cache OCaml 4.12 and dune
- name: Cache OCaml 4.14 and dune
uses: actions/cache@v1
id: cache
with:
path: ${{ github.workspace }}/ocaml-412/_install
key: ${{ matrix.os }}-cache-ocaml-412-dune-341-bits-${{ matrix.boot_cachekey }}
path: ${{ github.workspace }}/ocaml-414/_install
key: ${{ matrix.os }}-cache-ocaml-414-dune-361-bits-${{ matrix.boot_cachekey }}

- name: Checkout OCaml 4.12
- name: Checkout OCaml 4.14
uses: actions/checkout@master
if: steps.cache.outputs.cache-hit != 'true'
with:
repository: 'ocaml/ocaml'
path: 'ocaml-412'
ref: '4.12'
path: 'ocaml-414'
ref: '4.14'

- name: Setup 32-bit C compiler
if: matrix.name == 'i386' && steps.cache.outputs.cache-hit != 'true'
run: |
mkdir -p ocaml-412/_install/bin
{ echo '#!/bin/sh'; echo 'exec gcc -m32 "$@"'; } > ocaml-412/_install/bin/cc32
chmod +x ocaml-412/_install/bin/cc32
mkdir -p ocaml-414/_install/bin
{ echo '#!/bin/sh'; echo 'exec gcc -m32 "$@"'; } > ocaml-414/_install/bin/cc32
chmod +x ocaml-414/_install/bin/cc32
- name: Build OCaml 4.12
- name: Build OCaml 4.14
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ocaml-412
working-directory: ocaml-414
run: |
export PATH=$GITHUB_WORKSPACE/ocaml-412/_install/bin:$PATH
./configure --prefix=$GITHUB_WORKSPACE/ocaml-412/_install ${{ matrix.boot_config }}
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-412/_install/{lib/ocaml/compiler-libs,lib/ocaml/expunge,bin/*.byte}
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.4.1'
ref: '3.6.1'
path: 'dune'

- name: Build dune
working-directory: dune
if: steps.cache.outputs.cache-hit != 'true'
run: |
PATH=$GITHUB_WORKSPACE/ocaml-412/_install/bin:$PATH make release
cp dune.exe $GITHUB_WORKSPACE/ocaml-412/_install/bin/dune
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-412/_install/bin:$PATH
export PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH
autoconf
./configure \
--prefix=$GITHUB_WORKSPACE/_install \
Expand All @@ -106,7 +106,7 @@ jobs:
- name: Build, install and test ocaml-jst
working-directory: ocaml-jst
run: |
export PATH=$GITHUB_WORKSPACE/ocaml-412/_install/bin:$PATH
export PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH
make -f Makefile.jst runtest-upstream
env:
BUILD_OCAMLPARAM: ${{ matrix.ocamlparam }}
Expand Down

0 comments on commit 1569b58

Please sign in to comment.