Merge pull request #282 from stalecu/levenshtein/pascal #48
This file contains 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: Compile, Check & Run | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
hello-world: | |
runs-on: macos-latest | |
steps: | |
- run: echo LOCAL ${{ env.LOCAL }} | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup LLVM | |
uses: ZhongRuoyu/setup-llvm@v0 | |
with: | |
llvm-version: 17 | |
- name: Setup GraalVM w/ native-image | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
java-version: '23' | |
distribution: 'graalvm-community' | |
components: 'native-image' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install clojure tools | |
uses: DeLaGuardo/setup-clojure@ac5052cad8ffe5039f26968da4b4a0ca88d00971 | |
with: | |
cli: latest | |
bb: latest | |
no-auth: ${{ env.LOCAL == 'true' }} | |
- name: Setup Fortran | |
uses: fortran-lang/setup-fortran@v1 | |
id: setup-fortran | |
with: | |
compiler: gcc | |
version: '13' | |
# - name: Setup Haskell | |
# uses: haskell-actions/setup@v2 | |
# - name: Setup zig | |
# uses: mlugg/setup-zig@v1 | |
- name: Setup Dart | |
uses: dart-lang/setup-dart@v1 | |
- name: Set up PyPy | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 'pypy3.10' | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.11.0' | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: '1.1.34' | |
- uses: coursier/cache-action@v6 | |
- uses: VirtusLab/scala-cli-setup@main | |
- name: Cache Homebrew | |
uses: actions/cache@v4 | |
with: | |
path: | | |
/opt/Homebrew | |
/opt/Caskroom | |
key: ${{ runner.os }}-brew-${{ hashFiles('Brewfile') }} | |
restore-keys: | | |
${{ runner.os }}-brew- | |
- name: Brew Install hyperfine and various languages and tools | |
run: brew bundle --file=Brewfile | |
- name: Compile Hello World programs | |
run: | | |
cd hello-world | |
bash ../compile.sh | |
continue-on-error: true | |
- name: Run Hello World benchmarks | |
run: | | |
cd hello-world | |
bash ../run.sh | |
continue-on-error: true | |
## Compiling and checking all the benchmark sequentially takes a lot of time | |
## Trying to run them in parallell in different jobs runs into cache problems | |
## It takes a lot of time to restore the cache, and creating the large cache | |
## Sometimes fails. | |
# - name: Compile Loops programs | |
# run: | | |
# cd loops | |
# bash ../compile.sh | |
# continue-on-error: true | |
# - name: Check Loops programs | |
# run: | | |
# cd loops | |
# bash ../run.sh check | |
# continue-on-error: true | |
# - name: Compile Fibonacci programs | |
# run: | | |
# cd fibonacci | |
# bash ../compile.sh | |
# continue-on-error: true | |
# - name: Check Fibonacci programs | |
# run: | | |
# cd fibonacci | |
# bash ../run.sh check | |
# continue-on-error: true | |
# - name: Compile Levenshtein programs | |
# run: | | |
# cd levenshtein | |
# bash ../compile.sh | |
# continue-on-error: true | |
# - name: Check Levenshtein programs | |
# run: | | |
# cd levenshtein | |
# bash ../run.sh check | |
# continue-on-error: true |