Skip to content

Commit

Permalink
check(ocaml): Init
Browse files Browse the repository at this point in the history
  • Loading branch information
akirak committed Feb 25, 2024
1 parent 9790ba7 commit ab48888
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/check-ocaml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Check ocaml

on:
push:
paths:
# Set this to the directory of the template
- ocaml/**
- .github/workflows/check-ocaml.yml
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: cachix/install-nix-action@v25
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
with:
path: ./tmp

- name: Initialize a Dune project
run: |
nix run nixpkgs#dune_3 -- init project hello work
- name: Use the template
run: nix flake new -t ./tmp#ocaml ./work

- name: Prepare the project
working-directory: work
run: |
sed -i 's/throw "Name your OCaml package"/"hello"/' flake.nix
sed -i 's/throw "Version your OCaml package"/"0.1"/' flake.nix
git init
git add .
- name: Check executables
run: |
nix develop -L --command ocamlc --version
working-directory: work

0 comments on commit ab48888

Please sign in to comment.