Skip to content

Convert tests to native github CI. #354

Convert tests to native github CI.

Convert tests to native github CI. #354

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- master
jobs:
cancel_previous_run:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
build_details:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.packages.outputs.packages }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Grab packages to build
id: packages
run: |
printf "["
OUTPUT_ONLY=true ./tests/run_tests.sh | while read i; do echo "\\\"$i\\\""; done | xargs | sed -e 's# #,#g'
printf "]"
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.build_details.outputs.packages) }}
arch: [x64, x86]
ocaml_version: 4.14.1

Check failure on line 38 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 38, Col: 24): Unexpected value '4.14.1' .github/workflows/ci.yml (Line: 40, Col: 14): Unexpected symbol: '4.14.1'. Located at position 8 within expression: matrix.4.14.1
container:
image: ocamlcross/windows-${{ matrix.arch }}-base:${{ matrix.4.14.1 }}
options: --user root
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build package
env:
PKG_CONFIG_PATH: ${{ matrix.arch == "x64" && "/usr/src/mxe/usr/x86_64-w64-mingw32.static/lib/pkgconfig/" || "/usr/src/mxe/usr/i686-w64-mingw32.static/lib/pkgconfig/" }}
run: |
rm -rf /home/opam/opam-cross-windows/packages /home/opam/opam-cross-windows/repo
mv packages /home/opam/opam-cross-windows
mv repo /home/opam/opam-cross-windows
sudo -u opam opam update
sudo -u opam opam list --short --recursive --external --vars os-distribution=mxe,os-family=mingw --required-by=${{ matrix.package }} > /home/opam/mxe-deps
cd /usr/src/mxe/ && cat /home/opam/mxe-deps | xargs make
eval $(sudo -u opam opam env)
opam reinstall --verbose -y ${{ matrix.package }}
VERBOSE=1 SYSTEM_TYPE=${{ matrix.arch }} ./tests/run_tests.sh