Skip to content

Commit 1d57c7d

Browse files
authored
Merge branch 'apache:main' into main
2 parents f8fbe93 + e53cbf2 commit 1d57c7d

File tree

584 files changed

+66411
-14852
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

584 files changed

+66411
-14852
lines changed

.github/sync.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,7 @@ apache/fory-site@main:
2020
dest: docs/guide/
2121
- source: docs/specification/
2222
dest: docs/specification/
23+
- source: docs/compiler/
24+
dest: docs/compiler/
2325
- source: docs/benchmarks/
2426
dest: static/img/benchmarks/

.github/workflows/ci.yml

Lines changed: 107 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717

1818
name: Fory CI
1919

20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
2024
on:
2125
push:
2226
branches:
@@ -130,10 +134,10 @@ jobs:
130134
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
131135
restore-keys: |
132136
${{ runner.os }}-maven-
133-
- name: Set up Python 3.8
137+
- name: Set up Python 3.11
134138
uses: actions/setup-python@v5
135139
with:
136-
python-version: 3.8
140+
python-version: 3.11
137141
- name: Run CI with Maven
138142
shell: bash
139143
run: python ./ci/run_ci.py java --version windows_java21
@@ -268,11 +272,12 @@ jobs:
268272
# The distutils module has been removed starting from python 3.12
269273
# (see https://docs.python.org/3.10/library/distutils.html). Some
270274
# OS (such as macos-latest) uses python3.12 by default, so python 3.8
271-
# is used here to avoid this problem.
272-
- name: Set up Python3.8
275+
# is used here to avoid this problem. On Windows, use 3.11 to avoid
276+
# the slower 3.8 download on hosted runners.
277+
- name: Set up Python
273278
uses: actions/setup-python@v5
274279
with:
275-
python-version: 3.8
280+
python-version: ${{ runner.os == 'Windows' && '3.11' || '3.8' }}
276281
- name: Run CI with NodeJS
277282
run: python ./ci/run_ci.py javascript
278283

@@ -309,6 +314,10 @@ jobs:
309314
runs-on: ubuntu-latest
310315
steps:
311316
- uses: actions/checkout@v5
317+
- name: Set up Python 3.11
318+
uses: actions/setup-python@v5
319+
with:
320+
python-version: 3.11
312321
- name: Set up JDK 21
313322
uses: actions/setup-java@v4
314323
with:
@@ -324,11 +333,14 @@ jobs:
324333
- name: Run Rust Xlang Test
325334
env:
326335
FORY_RUST_JAVA_CI: "1"
336+
ENABLE_FORY_DEBUG_OUTPUT: "1"
327337
run: |
328338
cd java
329339
mvn -T16 --no-transfer-progress clean install -DskipTests
330340
cd fory-core
331341
mvn -T16 --no-transfer-progress test -Dtest=org.apache.fory.xlang.RustXlangTest
342+
- name: Run Rust IDL Tests
343+
run: ./integration_tests/idl_tests/run_rust_tests.sh
332344

333345
cpp:
334346
name: C++ CI
@@ -373,6 +385,15 @@ jobs:
373385
key: bazel-build-cpp-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('cpp/**', 'BUILD', 'WORKSPACE') }}
374386
- name: Run C++ CI with Bazel
375387
run: python ./ci/run_ci.py cpp
388+
- name: Upload Bazel Test Logs
389+
uses: actions/upload-artifact@v4
390+
if: ${{ !cancelled() }}
391+
with:
392+
name: bazel-test-logs-${{ matrix.os }}
393+
path: |
394+
bazel-out/*/testlogs/**/*.log
395+
bazel-out/*/testlogs/**/*.xml
396+
if-no-files-found: ignore
376397

377398
cpp_xlang:
378399
name: C++ Xlang Test
@@ -410,11 +431,46 @@ jobs:
410431
- name: Run CPP Xlang Test
411432
env:
412433
FORY_CPP_JAVA_CI: "1"
434+
ENABLE_FORY_DEBUG_OUTPUT: "1"
413435
run: |
414436
cd java
415437
mvn -T16 --no-transfer-progress clean install -DskipTests
416438
cd fory-core
417439
mvn -T16 --no-transfer-progress test -Dtest=org.apache.fory.xlang.CPPXlangTest
440+
- name: Run C++ IDL Tests
441+
run: ./integration_tests/idl_tests/run_cpp_tests.sh
442+
443+
javascript_xlang:
444+
name: JavaScript Xlang Test
445+
runs-on: ubuntu-latest
446+
steps:
447+
- uses: actions/checkout@v5
448+
- name: Use Node.js 20.x
449+
uses: actions/setup-node@v4
450+
with:
451+
node-version: 20.x
452+
- name: Set up JDK 21
453+
uses: actions/setup-java@v4
454+
with:
455+
java-version: 21
456+
distribution: "temurin"
457+
- name: Cache Maven local repository
458+
uses: actions/cache@v4
459+
with:
460+
path: ~/.m2/repository
461+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
462+
restore-keys: |
463+
${{ runner.os }}-maven-
464+
- name: Run JavaScript Xlang Test
465+
env:
466+
FORY_JAVASCRIPT_JAVA_CI: "0"
467+
run: |
468+
cd javascript
469+
npm install
470+
cd ../java
471+
mvn -T16 --no-transfer-progress clean install -DskipTests
472+
cd fory-core
473+
mvn -T16 --no-transfer-progress test -Dtest=org.apache.fory.xlang.JavaScriptXlangTest
418474
419475
cpp_examples:
420476
name: C++ Examples
@@ -531,6 +587,7 @@ jobs:
531587
- name: Run Python Xlang Test
532588
env:
533589
FORY_PYTHON_JAVA_CI: "1"
590+
ENABLE_FORY_DEBUG_OUTPUT: "1"
534591
run: |
535592
cd java
536593
mvn -T16 --no-transfer-progress clean install -DskipTests
@@ -539,6 +596,8 @@ jobs:
539596
mvn -T16 --no-transfer-progress test -Dtest=org.apache.fory.xlang.PyCrossLanguageTest
540597
cd ../fory-format
541598
mvn -T16 --no-transfer-progress test -Dtest=org.apache.fory.format.CrossLanguageTest
599+
- name: Run Python IDL Tests
600+
run: ./integration_tests/idl_tests/run_python_tests.sh
542601

543602
go:
544603
name: Golang CI
@@ -584,6 +643,10 @@ jobs:
584643
uses: actions/setup-go@v5
585644
with:
586645
go-version: '1.21'
646+
- name: Set up Python 3.11
647+
uses: actions/setup-python@v5
648+
with:
649+
python-version: 3.11
587650
- name: Set up JDK 21
588651
uses: actions/setup-java@v4
589652
with:
@@ -599,11 +662,50 @@ jobs:
599662
- name: Run Go Xlang Test
600663
env:
601664
FORY_GO_JAVA_CI: "1"
665+
ENABLE_FORY_DEBUG_OUTPUT: "1"
602666
run: |
603667
cd java
604668
mvn -T16 --no-transfer-progress clean install -DskipTests
605669
cd fory-core
606670
mvn -T16 --no-transfer-progress test -Dtest=org.apache.fory.xlang.GoXlangTest
671+
- name: Run Go IDL Tests
672+
run: ./integration_tests/idl_tests/run_go_tests.sh
673+
674+
dart:
675+
name: Dart CI
676+
runs-on: ubuntu-latest
677+
steps:
678+
- uses: actions/checkout@v5
679+
- name: Install Dart SDK
680+
run: |
681+
# Download and install Dart SDK
682+
DART_VERSION=3.6.1
683+
wget -q https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-x64-release.zip
684+
unzip -q dartsdk-linux-x64-release.zip
685+
export PATH="$PATH:$PWD/dart-sdk/bin"
686+
echo "$PWD/dart-sdk/bin" >> $GITHUB_PATH
687+
- name: Display Dart version
688+
run: dart --version
689+
- name: Get dependencies
690+
run: |
691+
cd dart
692+
dart pub get
693+
- name: Generate code
694+
run: |
695+
cd dart/packages/fory-test
696+
dart run build_runner build
697+
- name: Run tests
698+
run: |
699+
cd dart/packages/fory-test
700+
dart test
701+
- name: Run code analysis
702+
run: |
703+
cd dart/packages/fory-test
704+
dart analyze
705+
- name: Analyze code
706+
run: |
707+
cd dart
708+
dart analyze
607709
608710
lint:
609711
name: Code Style Check

.gitignore

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ python/pyfory/__pycache__/
1111
python/dist
1212
python/build
1313
python/pyfory.egg-info
14+
**/*.egg-info
1415
cython_debug
1516
**/*.prof
1617
**/*.pyc
@@ -34,7 +35,55 @@ scala/.idea
3435
bazel-*/
3536
bazel-fory/
3637
bazel-fory/**
38+
**/generated
3739
java/**/generated
40+
41+
# IDL compiler integration test outputs
42+
integration_tests/idl_tests/cpp/generated/
43+
integration_tests/idl_tests/go/addressbook*.go
44+
integration_tests/idl_tests/go/any_example/
45+
integration_tests/idl_tests/go/any_example_pb/
46+
integration_tests/idl_tests/go/complex_fbs/
47+
integration_tests/idl_tests/go/complex_pb/
48+
integration_tests/idl_tests/go/monster/
49+
integration_tests/idl_tests/go/optional_types/
50+
integration_tests/idl_tests/go/tree/
51+
integration_tests/idl_tests/go/graph/
52+
integration_tests/idl_tests/go/collection/
53+
integration_tests/idl_tests/java/src/main/
54+
integration_tests/idl_tests/go/root/
55+
integration_tests/idl_tests/go/addressbook/
56+
integration_tests/idl_tests/java/src/main/java/collection/
57+
integration_tests/idl_tests/java/src/main/java/addressbook/
58+
integration_tests/idl_tests/java/src/main/java/complex_fbs/
59+
integration_tests/idl_tests/java/src/main/java/complex_pb/
60+
integration_tests/idl_tests/java/src/main/java/monster/
61+
integration_tests/idl_tests/java/src/main/java/optional_types/
62+
integration_tests/idl_tests/java/src/main/java/tree/
63+
integration_tests/idl_tests/java/src/main/java/graph/
64+
integration_tests/idl_tests/java/src/main/java/root/
65+
integration_tests/idl_tests/python/src/addressbook.py
66+
integration_tests/idl_tests/python/src/any_example.py
67+
integration_tests/idl_tests/python/src/any_example_pb.py
68+
integration_tests/idl_tests/python/src/complex_fbs.py
69+
integration_tests/idl_tests/python/src/complex_pb.py
70+
integration_tests/idl_tests/python/src/monster.py
71+
integration_tests/idl_tests/python/src/optional_types.py
72+
integration_tests/idl_tests/python/src/collection.py
73+
integration_tests/idl_tests/python/src/tree.py
74+
integration_tests/idl_tests/python/src/graph.py
75+
integration_tests/idl_tests/python/src/root.py
76+
integration_tests/idl_tests/rust/src/addressbook.rs
77+
integration_tests/idl_tests/rust/src/any_example.rs
78+
integration_tests/idl_tests/rust/src/any_example_pb.rs
79+
integration_tests/idl_tests/rust/src/complex_fbs.rs
80+
integration_tests/idl_tests/rust/src/complex_pb.rs
81+
integration_tests/idl_tests/rust/src/monster.rs
82+
integration_tests/idl_tests/rust/src/optional_types.rs
83+
integration_tests/idl_tests/rust/src/collection.rs
84+
integration_tests/idl_tests/rust/src/tree.rs
85+
integration_tests/idl_tests/rust/src/graph.rs
86+
integration_tests/idl_tests/rust/src/root.rs
3887
javascript/**/dist/
3988
javascript/**/node_modules/
4089
javascript/**/build
@@ -98,3 +147,4 @@ examples/cpp/cmake_example/build
98147
**/benchmark_*.png
99148
**/results/
100149
benchmarks/**/report/
150+
ignored/**

0 commit comments

Comments
 (0)