这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
schedule:
- cron: "30 0 * * *"

jobs:
test-setup:
env:
OCAML_VARIANT: ocaml-variants.5.2.0+ox
strategy:
fail-fast: false
matrix:
# For info on the OS versions, architecture, etc., see
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
os: [ubuntu-latest, ubuntu-24.04-arm, macos-13, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Get hash of the ocaml-variant opam file
id: hash-opam-file
run: |
HASH=$(shasum -a 256 packages/ocaml-variants/${OCAML_VARIANT}/opam | awk '{print $1}')
echo "hash=${HASH}" >> "$GITHUB_OUTPUT"

- uses: ocaml/setup-ocaml@v3
with:
# Invalidate cache when opam file for the ocaml-variant changes
cache-prefix: ${{ steps.hash-opam-file.outputs.hash }}
ocaml-compiler: ${{ env.OCAML_VARIANT }}
opam-pin: false
opam-repositories: |
oxcaml: .
default: https://github.com/ocaml/opam-repository.git

- name: opam install packages
run: |
opam --version
opam repository list
opam list
opam install ocamlformat merlin ocaml-lsp-server utop parallel core_unix
opam list