Skip to content

Commit

Permalink
[CI] Add macos C++ build to ci.yml (#1295)
Browse files Browse the repository at this point in the history
macOS C++ build is added to CI workflow in this PR.
  • Loading branch information
PragmaTwice authored Jan 3, 2024
1 parent e67e253 commit a0b8a70
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
39 changes: 15 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,35 +43,14 @@ jobs:
MY_VAR: "PATH"
strategy:
matrix:
java-version: ["8", "11", "17"]
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' # temurin hasn't release for jdk21
- 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 }}
java21:
name: Java CI
runs-on: ubuntu-latest
strategy:
matrix:
java-version: ["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: 'oracle'
distribution: 'temurin'
- name: Install bazel
run: ./ci/run_ci.sh install_bazel
- name: Install python
Expand All @@ -80,6 +59,7 @@ jobs:
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
Expand All @@ -93,6 +73,7 @@ jobs:
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
Expand All @@ -110,6 +91,7 @@ jobs:
# 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
Expand All @@ -126,6 +108,7 @@ jobs:
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
Expand All @@ -140,6 +123,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Run CI with NodeJS
run: ./ci/run_ci.sh javascript

rust:
name: Rust CI
runs-on: ubuntu-latest
Expand All @@ -148,9 +132,13 @@ jobs:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- run: ./ci/run_ci.sh rust

cpp:
name: C++ CI
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
Expand All @@ -161,6 +149,7 @@ jobs:
run: ./ci/run_ci.sh install_bazel
- name: Run C++ CI with Bazel
run: ./ci/run_ci.sh cpp

python:
name: Python CI
# Fix python 3.6 install issue, see
Expand All @@ -179,6 +168,7 @@ jobs:
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
Expand All @@ -201,6 +191,7 @@ jobs:
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
Expand Down
18 changes: 13 additions & 5 deletions ci/run_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ install_bazel() {
echo "existing bazel version $(bazel version)"
fi
# GRPC support bazel 6.3.2 https://grpc.github.io/grpc/core/md_doc_bazel_support.html
URL="https://github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-installer-linux-x86_64.sh"
UNAME_OUT="$(uname -s)"
case "${UNAME_OUT}" in
Linux*) MACHINE=linux;;
Darwin*) MACHINE=darwin;;
*) echo "unknown machine: $UNAME_OUT"
esac
URL="https://github.com/bazelbuild/bazel/releases/download/6.3.2/bazel-6.3.2-installer-$MACHINE-x86_64.sh"
wget -q -O install.sh $URL
chmod +x install.sh
set +x
Expand All @@ -63,10 +69,12 @@ install_bazel() {
rm -f install.sh
VERSION=`bazel version`
echo "bazel version: $VERSION"
MEM=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
JOBS=`expr $MEM / 1024 / 1024 / 3`
echo "build --jobs="$JOBS >> ~/.bazelrc
grep "jobs" ~/.bazelrc
if [[ "$MACHINE" == linux ]]; then
MEM=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
JOBS=`expr $MEM / 1024 / 1024 / 3`
echo "build --jobs="$JOBS >> ~/.bazelrc
grep "jobs" ~/.bazelrc
fi
}

JDKS=(
Expand Down
1 change: 1 addition & 0 deletions src/fury/meta/type_traits_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <list>
#include <queue>
#include <type_traits>
#include <unordered_map>

#include "fury/meta/field_info.h"
#include "src/fury/meta/type_traits.h"
Expand Down

0 comments on commit a0b8a70

Please sign in to comment.