griftとlSdtiの順番を対応 #26
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: | |
| - master | |
| - main | |
| pull_request: | |
| jobs: | |
| build: | |
| name: Build and Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| # コードを取得 | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| # OCaml環境セットアップ | |
| - name: Use OCaml 5.2 | |
| uses: ocaml/setup-ocaml@v3 | |
| with: | |
| ocaml-compiler: 5.2.x | |
| dune-cache: true | |
| # opamの依存関係(Core, Asyncなど)をキャッシュして、 | |
| # *.opam ファイルが変わらない限りインストールをスキップさせる | |
| - name: Restore opam cache | |
| id: cache-opam | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.opam | |
| # OS, コンパイラバージョン, opamファイルの内容 をキーにする | |
| key: ${{ runner.os }}-opam-5.2-${{ hashFiles('*.opam') }} | |
| restore-keys: | | |
| ${{ runner.os }}-opam-5.2- | |
| - name: Install system packages | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgc-dev libcjson-dev pkg-config | |
| # 依存ライブラリのインストール | |
| # --with-test : テストに必要なライブラリもinstall | |
| - name: Install dependencies | |
| run: | | |
| opam update | |
| opam install . --deps-only --with-test | |
| # 【追加機能 1】 bench.ml のコメントアウトを外す | |
| # ビルドする前にソースコードを書き換えます | |
| # bin/bench.ml の中の (* "filename" *) という形式のコメントを外す設定です | |
| # もし形式が違う場合はここを調整する必要があります | |
| # 確認のため、書き換わった中身をログに表示(デバッグ用) | |
| # - name: Enable all benchmarks | |
| # run: | | |
| # sed -i 's/(\* "\(.*\)"; \*)/"\1";/' bin/bench.ml || true | |
| # cat bin/bench.ml | |
| # ビルド実行 (dune build) | |
| - name: Build | |
| run: opam exec -- dune build | |
| # テスト実行 (dune runtest) | |
| - name: Test | |
| run: opam exec -- dune runtest | |
| # install して dotests.sh を実行 (dune install) | |
| # lSdti コマンドをインストール | |
| # 実行権限を与えてスクリプトを実行 | |
| - name: Run Integration Tests | |
| run: | | |
| opam exec -- dune install | |
| chmod +x compile_test/dotests.sh | |
| opam exec -- ./compile_test/dotests.sh | |
| # 【追加機能 3】 ベンチマークを実行 | |
| # - name: Run Benchmark | |
| # run: | | |
| # opam exec -- dune exec bin/bench.exe |