Convert tests to native github CI. #354
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 GitHub Actions / CIInvalid workflow file
|
||
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 |