Stale package from cache #1950
Workflow file for this run
This file contains hidden or 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: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| DUNE_PROFILE: release | |
| OCAMLRUNPARAM: b | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| defaults: | |
| run: | |
| shell: bash -xeuo pipefail {0} | |
| jobs: | |
| build: | |
| name: Build and test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - macos-latest | |
| - ubuntu-latest | |
| # - windows-latest | |
| ocaml-compiler: | |
| - 4.14.1 | |
| - 5.4.0 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use OCaml ${{ matrix.ocaml-compiler }} | |
| uses: ocaml/setup-ocaml@v3.4.5 | |
| with: | |
| ocaml-compiler: ${{ matrix.ocaml-compiler }} | |
| dune-cache: false | |
| opam-disable-sandboxing: true | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install opam deps | |
| run: make install | |
| - name: Install npm deps | |
| run: make install-npm | |
| - name: Pin dependencies | |
| run: make pin | |
| - name: Build | |
| run: make build | |
| - name: Check formatting | |
| if: matrix.ocaml-compiler != '4.14.1' | |
| run: make format-check | |
| - name: Run tests | |
| run: make test | |
| - name: Generate docs | |
| if: github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest' && matrix.ocaml-compiler == '5.4.0' | |
| run: | | |
| opam install -y odoc-driver | |
| make docs | |
| - name: Upload docs artifact | |
| if: github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest' && matrix.ocaml-compiler == '5.4.0' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: documentation | |
| path: _html | |
| retention-days: 1 | |
| - name: Run benchmarks | |
| run: make bench | |
| - name: Run benchmarks as JSON | |
| if: matrix.os == 'ubuntu-latest' && matrix.ocaml-compiler == '5.4.0' | |
| run: make bench-json | |
| - name: Store benchmark result | |
| if: matrix.os == 'ubuntu-latest' && matrix.ocaml-compiler == '5.4.0' | |
| uses: benchmark-action/github-action-benchmark@v1 | |
| with: | |
| name: server-reason-react Benchmarks | |
| tool: 'customBiggerIsBetter' | |
| output-file-path: bench_results.json | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| auto-push: ${{ github.ref == 'refs/heads/main' }} | |
| gh-pages-branch: gh-pages | |
| benchmark-data-dir-path: dev/bench | |
| comment-always: true | |
| fail-on-alert: true | |
| comment-on-alert: true | |
| alert-comment-cc-users: '@davesnx' | |
| - name: Install dune-release | |
| if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest' && matrix.ocaml-compiler == '5.4.0' | |
| run: opam install dune-release -y | |
| - name: Release | |
| uses: davesnx/dune-release-action@v0.2.14 | |
| if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest' && matrix.ocaml-compiler == '5.4.0' | |
| with: | |
| packages: 'server-reason-react' | |
| changelog: './CHANGES.md' | |
| github-token: ${{ secrets.GH_TOKEN }} | |
| publish-docs: | |
| name: Publish documentation | |
| needs: build | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: https://ml-in-barcelona.github.io/server-reason-react | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download docs artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: documentation | |
| path: _html | |
| - name: Publish to GitHub Pages | |
| uses: crazy-max/ghaction-github-pages@v1 | |
| with: | |
| target_branch: gh-pages | |
| build_dir: _html | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} |