1
1
name : Cross-platform Build and Test
2
-
3
2
on :
4
3
push :
5
4
branches : [ "master" ]
@@ -22,42 +21,34 @@ jobs:
22
21
- x86_64-apple-darwin
23
22
- x86_64-pc-windows-gnu
24
23
# - aarch64-pc-windows-msvc
25
-
26
24
steps :
27
- - uses : actions/checkout@v3
28
-
29
- - name : Install Rust
30
- uses : actions-rs/toolchain@v1
31
- with :
32
- toolchain : stable
33
- target : ${{ matrix.target }}
34
- override : true
35
-
36
- - name : Install cargo-binstall
37
- uses : taiki-e/install-action@cargo-binstall
38
-
39
- - name : Install Zig
40
- uses : goto-bus-stop/setup-zig@v2
41
- with :
42
- version : 0.10.1
43
-
44
- - name : Install cargo-zigbuild
45
- run : cargo binstall --no-confirm cargo-zigbuild
46
-
47
- - name : Set up MinGW (for x86_64 Windows)
48
- if : ${{ matrix.target == 'x86_64-pc-windows-gnu' }}
49
- run : sudo apt-get install gcc-mingw-w64-x86-64 -y
50
-
51
- - name : Run compile script
52
- run : |
53
- chmod +x .github/scripts/compile_all_targets_java_new.sh
54
- .github/scripts/compile_all_targets_java_new.sh ${{ matrix.target }}
55
-
56
- - name : Upload artifacts
57
- uses : actions/upload-artifact@v3
58
- with :
59
- name : ${{ matrix.target }}
60
- path : target/${{ matrix.target }}/release/*
25
+ - uses : actions/checkout@v3
26
+ - name : Install Rust
27
+ uses : actions-rs/toolchain@v1
28
+ with :
29
+ toolchain : stable
30
+ target : ${{ matrix.target }}
31
+ override : true
32
+ - name : Install cargo-binstall
33
+ uses : taiki-e/install-action@cargo-binstall
34
+ - name : Install Zig
35
+ uses : goto-bus-stop/setup-zig@v2
36
+ with :
37
+ version : 0.10.1
38
+ - name : Install cargo-zigbuild
39
+ run : cargo binstall --no-confirm cargo-zigbuild
40
+ - name : Set up MinGW (for x86_64 Windows)
41
+ if : ${{ matrix.target == 'x86_64-pc-windows-gnu' }}
42
+ run : sudo apt-get install gcc-mingw-w64-x86-64 -y
43
+ - name : Run compile script
44
+ run : |
45
+ chmod +x .github/scripts/compile_all_targets_java_new.sh
46
+ .github/scripts/compile_all_targets_java_new.sh ${{ matrix.target }}
47
+ - name : Upload artifacts
48
+ uses : actions/upload-artifact@v3
49
+ with :
50
+ name : ${{ matrix.target }}-java-code
51
+ path : bindings/java/java_code
61
52
62
53
test :
63
54
name : Test on ${{ matrix.os }}
@@ -75,37 +66,35 @@ jobs:
75
66
target : aarch64-apple-darwin
76
67
- os : windows-latest
77
68
target : x86_64-pc-windows-gnu
78
-
79
69
runs-on : ${{ matrix.os }}
80
-
81
70
steps :
82
- - uses : actions/checkout@v3
83
-
84
- - name : Install Rust
85
- uses : actions-rs/toolchain@v1
86
- with :
87
- toolchain : stable
88
- target : ${{ matrix.target }}
89
- override : true
90
-
91
- - name : Download artifacts
92
- uses : actions/download-artifact@v3
93
- with :
94
- name : ${{ matrix.target }}
95
- path : target/${{ matrix.target }}/release
96
-
97
- - name : Make binaries executable
98
- if : runner.os != 'Windows'
99
- run : chmod +x target/${{ matrix.target }}/release/*
100
-
101
- # Windows has a weird heap allocation error when running tests
102
- # This happens because each test in fk20, will create commit and opening
103
- # keys. Its not clear as to why the tests are not freeing the heap allocations
104
- # on windows, but running the tests on a single thread, fixes it.
105
- - name : Run tests (Windows )
106
- if : runner.os == 'Windows'
107
- run : cargo test --target ${{ matrix.target }} -- --test-threads=1 --nocapture
108
-
109
- - name : Run tests
110
- if : runner.os != 'Windows'
111
- run : cargo test --target ${{ matrix.target }}
71
+ - uses : actions/checkout@v3
72
+ - name : Install Rust
73
+ uses : actions-rs/toolchain@v1
74
+ with :
75
+ toolchain : stable
76
+ target : ${{ matrix.target }}
77
+ override : true
78
+ - name : Download artifacts
79
+ uses : actions/download-artifact@v3
80
+ with :
81
+ name : ${{ matrix.target }}-java-code
82
+ path : bindings/java/java_code
83
+
84
+ - name : List contents of downloaded artifact
85
+ run : ls -R bindings/java/java_code
86
+ shell : bash
87
+
88
+ - name : Set up JDK
89
+ uses : actions/setup-java@v3
90
+ with :
91
+ distribution : ' temurin '
92
+ java-version : ' 17 '
93
+
94
+ - name : Build with Gradle (no tests )
95
+ run : ./gradlew build -x test
96
+ working-directory : bindings/java/java_code
97
+
98
+ - name : Run Gradle tests
99
+ run : ./gradlew test --scan
100
+ working-directory : bindings/java/java_code
0 commit comments