Skip to content

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
Signed-off-by: Liangliang Sui <[email protected]>
  • Loading branch information
LiangliangSui committed Jan 5, 2024
1 parent a9057eb commit c2cdd83
Show file tree
Hide file tree
Showing 5 changed files with 300 additions and 162 deletions.
308 changes: 156 additions & 152 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ on:
push:
branches:
- main
- dev
- 'releases/**'
- 'deploy/**'
- 'test*'
Expand All @@ -36,108 +37,108 @@ on:
types: ['opened', 'reopened', 'synchronize']

jobs:
java:
name: Java CI
runs-on: ubuntu-latest
env:
MY_VAR: "PATH"
strategy:
matrix:
java-version: ["8", "11", "17", "21"]
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
- name: Install bazel
run: ./ci/run_ci.sh install_bazel
- name: Install python
run: ./ci/run_ci.sh install_python
- name: Install pyfury
run: ./ci/run_ci.sh install_pyfury
- name: Run CI with Maven
run: ./ci/run_ci.sh java${{ matrix.java-version }}
# java:
# name: Java CI
# runs-on: ubuntu-latest
# env:
# MY_VAR: "PATH"
# strategy:
# matrix:
# java-version: ["8", "11", "17", "21"]
# steps:
# - uses: actions/checkout@v3
# - name: Set up JDK ${{ matrix.java-version }}
# uses: actions/setup-java@v3
# with:
# java-version: ${{ matrix.java-version }}
# distribution: 'temurin'
# - name: Install bazel
# run: ./ci/run_ci.sh install_bazel
# - name: Install python
# run: ./ci/run_ci.sh install_python
# - name: Install pyfury
# run: ./ci/run_ci.sh install_pyfury
# - name: Run CI with Maven
# run: ./ci/run_ci.sh java${{ matrix.java-version }}

graalvm:
name: GraalVM CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Build native image and run
run: ./ci/run_ci.sh graalvm_test
# graalvm:
# name: GraalVM CI
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: graalvm/setup-graalvm@v1
# with:
# java-version: '21'
# distribution: 'graalvm'
# github-token: ${{ secrets.GITHUB_TOKEN }}
# native-image-job-reports: 'true'
# - name: Build native image and run
# run: ./ci/run_ci.sh graalvm_test

scala:
name: Scala CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'
- name: Install fury java
run: cd java && mvn -T10 clean install -DskipTests && cd -
- name: Test
run: |
# Avoid sbt download jackson-databind error
rm -rf /home/runner/.m2/repository/com/fasterxml/jackson/
cd scala && sbt +test && cd -
# scala:
# name: Scala CI
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Set up JDK8
# uses: actions/setup-java@v3
# with:
# java-version: 8
# distribution: 'temurin'
# - name: Install fury java
# run: cd java && mvn -T10 clean install -DskipTests && cd -
# - name: Test
# run: |
# # Avoid sbt download jackson-databind error
# rm -rf /home/runner/.m2/repository/com/fasterxml/jackson/
# cd scala && sbt +test && cd -

integration_tests:
name: integration_tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'
- name: Install fury-benchmark jar
run: |
cd java && mvn -T10 -B --no-transfer-progress clean install -DskipTests && cd -
cd java/fury-benchmark && mvn -T10 -B --no-transfer-progress clean install -DskipTests -Pjmh && cd -
- name: Run CI
run: ./ci/run_ci.sh integration_tests
# integration_tests:
# name: integration_tests
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Set up JDK8
# uses: actions/setup-java@v3
# with:
# java-version: 8
# distribution: 'temurin'
# - name: Install fury-benchmark jar
# run: |
# cd java && mvn -T10 -B --no-transfer-progress clean install -DskipTests && cd -
# cd java/fury-benchmark && mvn -T10 -B --no-transfer-progress clean install -DskipTests -Pjmh && cd -
# - name: Run CI
# run: ./ci/run_ci.sh integration_tests

javascript:
name: Javascript CI
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Run CI with NodeJS
run: ./ci/run_ci.sh javascript
# javascript:
# name: Javascript CI
# runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [14.x, 20.x]
# steps:
# - uses: actions/checkout@v3
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node-version }}
# - name: Run CI with NodeJS
# run: ./ci/run_ci.sh javascript

rust:
name: Rust CI
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- run: ./ci/run_ci.sh rust
# rust:
# name: Rust CI
# runs-on: ubuntu-latest
# timeout-minutes: 45
# steps:
# - uses: actions/checkout@v3
# - uses: dtolnay/rust-toolchain@nightly
# - run: ./ci/run_ci.sh rust

cpp:
name: C++ CI
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-2022]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -146,67 +147,70 @@ jobs:
with:
python-version: 3.8
- name: Install bazel
run: ./ci/run_ci.sh install_bazel
run: |
pip install psutil
pip install pyarrow==14.0.0
python ./ci/run_ci.py install-bazel
- name: Run C++ CI with Bazel
run: ./ci/run_ci.sh cpp
run: python ./ci/run_ci.py cpp

python:
name: Python CI
# Fix python 3.6 install issue, see
# https://github.com/rwth-i6/returnn/commit/38ecab17d781c4b74db6a174c8097187380b4ddc
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.7, 3.12]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install bazel
run: ./ci/run_ci.sh install_bazel
- name: Run Python CI
run: ./ci/run_ci.sh python
# python:
# name: Python CI
# # Fix python 3.6 install issue, see
# # https://github.com/rwth-i6/returnn/commit/38ecab17d781c4b74db6a174c8097187380b4ddc
# runs-on: ubuntu-20.04
# strategy:
# matrix:
# python-version: [3.7, 3.12]
# steps:
# - uses: actions/checkout@v3
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install bazel
# run: ./ci/run_ci.sh install_bazel
# - name: Run Python CI
# run: ./ci/run_ci.sh python

go:
name: Golang CI
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.13', '1.18' ]
steps:
- uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- name: Install bazel
run: ./ci/run_ci.sh install_bazel
- name: Install python
run: ./ci/run_ci.sh install_python
- name: Install pyfury
run: ./ci/run_ci.sh install_pyfury
- name: Run Golang CI
run: ./ci/run_ci.sh go
# go:
# name: Golang CI
# runs-on: ubuntu-latest
# strategy:
# matrix:
# go-version: [ '1.13', '1.18' ]
# steps:
# - uses: actions/checkout@v4
# - name: Setup Go ${{ matrix.go-version }}
# uses: actions/setup-go@v4
# with:
# go-version: ${{ matrix.go-version }}
# - name: Display Go version
# run: go version
# - name: Install bazel
# run: ./ci/run_ci.sh install_bazel
# - name: Install python
# run: ./ci/run_ci.sh install_python
# - name: Install pyfury
# run: ./ci/run_ci.sh install_pyfury
# - name: Run Golang CI
# run: ./ci/run_ci.sh go

lint:
name: Code Style Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'oracle'
- name: Check License Header
uses: korandoru/hawkeye@v3
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Check code style
run: ./ci/run_ci.sh format
# lint:
# name: Code Style Check
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Set up JDK ${{ matrix.java-version }}
# uses: actions/setup-java@v3
# with:
# java-version: 21
# distribution: 'oracle'
# - name: Check License Header
# uses: korandoru/hawkeye@v3
# - name: Set up Python 3.8
# uses: actions/setup-python@v2
# with:
# python-version: 3.8
# - name: Check code style
# run: ./ci/run_ci.sh format
Loading

0 comments on commit c2cdd83

Please sign in to comment.