Skip to content

chore: Try odoc on windows #469

chore: Try odoc on windows

chore: Try odoc on windows #469

Workflow file for this run

name: Build
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
steps:
- uses: actions/setup-node@v2
with:
node-version: '18'
- uses: actions/checkout@v2.3.2
- name: Install esy
run: npm install -g esy@beta
- name: Try to restore install cache
uses: actions/cache@v2.1.1
with:
path: ~/.esy/source
key: source-${{ hashFiles('**/index.json') }}
- name: Install
run: esy install
- name: Print esy cache
uses: actions/github-script@v3.0.0
id: print_esy_cache
with:
script: |
const path = require('path')
const scriptPath = path.resolve('.github/workflows/print_esy_cache.js')
require(scriptPath)(core)
- name: Try to restore build cache
id: deps-cache
uses: actions/cache@v2.1.1
with:
path: ${{ steps.print_esy_cache.outputs.esy_cache }}
key: build-odiff-${{ matrix.os }}-${{ hashFiles('**/index.json') }}
restore-keys: build-odiff-${{ matrix.os }}
# Here we use a low-level command. In real situation you don't have to
# but it is useful in CI as it split the log in GitHub UI.
# You can see at a glance if it is your projet or your deps that break.
#
# We also use --release flag to build less.
# This allow us to spot syntax/type error more quickly.
- name: Build release dependencies
if: steps.deps-cache.outputs.cache-hit != 'true'
run: esy build-dependencies --release
- name: Build project in release
run: esy build --release
# Now that our core project build let builds others deps
- name: Build dependencies
if: steps.deps-cache.outputs.cache-hit != 'true'
run: esy build-dependencies
- name: Build project
run: esy build
- name: Ensure reamde is up-to-date
run: node scripts/process-readme.js verify
# Here we cleanup if we have a cache fail because we use restore-keys.
# restore-keys take the old store even on cache fail.
# So, we have deps we don't care anymore. We prune them.
- name: Clean global store
if: steps.deps-cache.outputs.cache-hit != 'true'
run: esy cleanup .
- name: Test
run: esy test
- name: Test node bindings
run: esy test-js
- name: Test ts declaration
run: esy test-ts
- uses: actions/upload-artifact@v2
if: failure()
with:
name: orange_diff_generated
path: test/test-images
- name: Build docs
run: esy doc