Skip to content

Uprev to v4.4.0

Uprev to v4.4.0 #317

name: "Test: Language Bindings"
# To add a new language binding test
# - Add a new job with your test
# - Add the new job to the list of 'needs' in `test_all_langs`
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test_all_langs:
name: "All Language Tests Complete"
needs:
- test_Cpp
- test_csharp
- test_go
- test_haskell
- test_java
- test_javascript
- test_julia
- test_perl
- test_php
- test_R
- test_ruby
runs-on: ubuntu-latest
steps:
- name: NoOp
run: echo 'Done'
test_Cpp:
name: "Test: C++"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: make
run: |
make cpp
test_csharp:
name: "Test: C#"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: prereqs
# https://linuxize.com/post/how-to-install-mono-on-ubuntu-20-04/
run: |
sudo apt-get update
sudo apt-get install gnupg apt-transport-https ca-certificates software-properties-common -y
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo apt-add-repository 'deb https://download.mono-project.com/repo/ubuntu stable-focal main'
sudo apt install mono-complete
mono --version
- name: execute
run: |
make cs
test_go:
name: "Test: GoLang"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: go install
run: sudo apt install golang-go
- name: make go
run: make go
test_haskell:
name: "Test: Haskell"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: dep install
run: |
sudo apt update
sudo apt install cabal-install haskell-stack ghc
ghc --version
cabal update
- name: make haskell
run: |
make haskell
cd src/haskell/ && cabal run src d20
test_java:
name: "Test: Java"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: java dependencies
run: |
sudo apt-get update
sudo apt-get install default-jdk -y
sudo apt-get install openjdk-8-jdk -y
- name: make java
run: |
make java
test_javascript:
name: "Test: JavaScript"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "10.0"
- name: python deps
run: python3 -m pip install -r reqs/requirements.txt
- name: apt prerequisites
run: |
sudo apt install clang-14 lld-14 llvm-14 libjs-d3 python3-numpy
sudo apt install llvm -y
- name: javascript prerequisites
run: |
# NodeJS
curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
# Acorn-Node
git clone https://github.com/acornjs/acorn.git
cd acorn ; npm install ; cd -
# Emscripten
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk ; ./emsdk install latest ; cd -
# wget --no-verbose -c http://archive.ubuntu.com/ubuntu/pool/universe/e/emscripten/emscripten_3.1.6~dfsg-5_all.deb
# sudo apt install -f ./emscripten_3.1.6~dfsg-5_all.deb nodejs- node-acorn- # ignore nodejs acorn max version
- name: make js
run: |
cd emsdk ; ./emsdk activate latest ; source ./emsdk_env.sh ; cd -
emcc -v
make js
node ./build/js/a.out.js 1d20
test_julia:
name: "Test: Julia"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: julia install
run: |
wget https://julialang-s3.julialang.org/bin/linux/x64/1.8/julia-1.8.2-linux-x86_64.tar.gz
tar zxvf julia-1.8.2-linux-x86_64.tar.gz
export PATH="$PATH:$PWD/julia-1.8.2/bin"
- name: make julia
run: |
PATH="$PATH:$PWD/julia-1.8.2/bin" make julia
test_perl:
name: "Test: Perl"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: perl install
run: |
sudo apt install perl
- name: make perl
run: make perl
- name: test perl
run: perl src/perl/example_application.pl
test_R:
name: "Test: R"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
- name: make r
run: make r
test_ruby:
name: "Test: Ruby"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: ruby install
run: |
sudo apt install ruby-full
sudo gem install ffi
- name: make ruby
run: make ruby
test_php:
name: "Test: PHP"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
coverage: none
ini-values: enable_dl=True
extensions: dice
env:
DICE_PATH: src/PHP/
- name: make php
run: make php