Fangjun Kuang
Committed by GitHub

Add ccache to CI (#375)

@@ -47,7 +47,7 @@ jobs: @@ -47,7 +47,7 @@ jobs:
47 os: [ubuntu-latest] 47 os: [ubuntu-latest]
48 48
49 steps: 49 steps:
50 - - uses: actions/checkout@v2 50 + - uses: actions/checkout@v4
51 with: 51 with:
52 fetch-depth: 0 52 fetch-depth: 0
53 53
@@ -147,7 +147,7 @@ jobs: @@ -147,7 +147,7 @@ jobs:
147 147
148 tar cjvf ${dst}.tar.bz2 $dst 148 tar cjvf ${dst}.tar.bz2 $dst
149 149
150 - - uses: actions/upload-artifact@v2 150 + - uses: actions/upload-artifact@v3
151 with: 151 with:
152 path: sherpa-onnx-*linux-aarch64.tar.bz2 152 path: sherpa-onnx-*linux-aarch64.tar.bz2
153 153
@@ -49,7 +49,7 @@ jobs: @@ -49,7 +49,7 @@ jobs:
49 os: [ubuntu-latest] 49 os: [ubuntu-latest]
50 50
51 steps: 51 steps:
52 - - uses: actions/checkout@v2 52 + - uses: actions/checkout@v4
53 with: 53 with:
54 fetch-depth: 0 54 fetch-depth: 0
55 55
@@ -103,7 +103,7 @@ jobs: @@ -103,7 +103,7 @@ jobs:
103 103
104 ls -lh 104 ls -lh
105 105
106 - - uses: actions/upload-artifact@v2 106 + - uses: actions/upload-artifact@v3
107 with: 107 with:
108 name: sherpa-onnx-android-libs 108 name: sherpa-onnx-android-libs
109 path: ./jniLibs 109 path: ./jniLibs
@@ -25,7 +25,7 @@ jobs: @@ -25,7 +25,7 @@ jobs:
25 os: [ubuntu-latest] 25 os: [ubuntu-latest]
26 26
27 steps: 27 steps:
28 - - uses: actions/checkout@v2 28 + - uses: actions/checkout@v4
29 with: 29 with:
30 fetch-depth: 0 30 fetch-depth: 0
31 - name: Display NDK HOME 31 - name: Display NDK HOME
@@ -47,7 +47,7 @@ jobs: @@ -47,7 +47,7 @@ jobs:
47 run: | 47 run: |
48 ls -lh ./apks/ 48 ls -lh ./apks/
49 49
50 - - uses: actions/upload-artifact@v2 50 + - uses: actions/upload-artifact@v3
51 with: 51 with:
52 path: ./apks/*.apk 52 path: ./apks/*.apk
53 53
@@ -38,7 +38,7 @@ jobs: @@ -38,7 +38,7 @@ jobs:
38 os: [ubuntu-latest] 38 os: [ubuntu-latest]
39 39
40 steps: 40 steps:
41 - - uses: actions/checkout@v2 41 + - uses: actions/checkout@v4
42 with: 42 with:
43 fetch-depth: 0 43 fetch-depth: 0
44 44
@@ -140,7 +140,7 @@ jobs: @@ -140,7 +140,7 @@ jobs:
140 140
141 tar cjvf ${dst}.tar.bz2 $dst 141 tar cjvf ${dst}.tar.bz2 $dst
142 142
143 - - uses: actions/upload-artifact@v2 143 + - uses: actions/upload-artifact@v3
144 with: 144 with:
145 path: sherpa-onnx-*linux-arm-gnueabihf.tar.bz2 145 path: sherpa-onnx-*linux-arm-gnueabihf.tar.bz2
146 146
@@ -25,7 +25,7 @@ jobs: @@ -25,7 +25,7 @@ jobs:
25 os: [ubuntu-latest] 25 os: [ubuntu-latest]
26 26
27 steps: 27 steps:
28 - - uses: actions/checkout@v2 28 + - uses: actions/checkout@v4
29 29
30 - name: Set up QEMU 30 - name: Set up QEMU
31 uses: docker/setup-qemu-action@v2 31 uses: docker/setup-qemu-action@v2
@@ -49,7 +49,7 @@ jobs: @@ -49,7 +49,7 @@ jobs:
49 49
50 ls -lh ./wheelhouse/*.whl 50 ls -lh ./wheelhouse/*.whl
51 51
52 - - uses: actions/upload-artifact@v2 52 + - uses: actions/upload-artifact@v3
53 with: 53 with:
54 path: ./wheelhouse/*.whl 54 path: ./wheelhouse/*.whl
55 55
@@ -26,7 +26,7 @@ jobs: @@ -26,7 +26,7 @@ jobs:
26 python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] 26 python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
27 27
28 steps: 28 steps:
29 - - uses: actions/checkout@v2 29 + - uses: actions/checkout@v4
30 30
31 - name: Set up QEMU 31 - name: Set up QEMU
32 uses: docker/setup-qemu-action@v2 32 uses: docker/setup-qemu-action@v2
@@ -25,7 +25,7 @@ jobs: @@ -25,7 +25,7 @@ jobs:
25 os: [macos-latest] 25 os: [macos-latest]
26 26
27 steps: 27 steps:
28 - - uses: actions/checkout@v2 28 + - uses: actions/checkout@v4
29 29
30 # see https://cibuildwheel.readthedocs.io/en/stable/changelog/ 30 # see https://cibuildwheel.readthedocs.io/en/stable/changelog/
31 # for a list of versions 31 # for a list of versions
@@ -47,7 +47,7 @@ jobs: @@ -47,7 +47,7 @@ jobs:
47 47
48 ls -lh ./wheelhouse/*.whl 48 ls -lh ./wheelhouse/*.whl
49 49
50 - - uses: actions/upload-artifact@v2 50 + - uses: actions/upload-artifact@v3
51 with: 51 with:
52 path: ./wheelhouse/*.whl 52 path: ./wheelhouse/*.whl
53 53
@@ -25,7 +25,7 @@ jobs: @@ -25,7 +25,7 @@ jobs:
25 os: [windows-latest] 25 os: [windows-latest]
26 26
27 steps: 27 steps:
28 - - uses: actions/checkout@v2 28 + - uses: actions/checkout@v4
29 29
30 # see https://cibuildwheel.readthedocs.io/en/stable/changelog/ 30 # see https://cibuildwheel.readthedocs.io/en/stable/changelog/
31 # for a list of versions 31 # for a list of versions
@@ -44,7 +44,7 @@ jobs: @@ -44,7 +44,7 @@ jobs:
44 44
45 ls -lh ./wheelhouse/*.whl 45 ls -lh ./wheelhouse/*.whl
46 46
47 - - uses: actions/upload-artifact@v2 47 + - uses: actions/upload-artifact@v3
48 with: 48 with:
49 path: ./wheelhouse/*.whl 49 path: ./wheelhouse/*.whl
50 50
@@ -25,7 +25,7 @@ jobs: @@ -25,7 +25,7 @@ jobs:
25 os: [ubuntu-latest, windows-latest] 25 os: [ubuntu-latest, windows-latest]
26 26
27 steps: 27 steps:
28 - - uses: actions/checkout@v2 28 + - uses: actions/checkout@v4
29 29
30 # see https://cibuildwheel.readthedocs.io/en/stable/changelog/ 30 # see https://cibuildwheel.readthedocs.io/en/stable/changelog/
31 # for a list of versions 31 # for a list of versions
@@ -61,7 +61,7 @@ jobs: @@ -61,7 +61,7 @@ jobs:
61 rm -rf ./wheelhouse 61 rm -rf ./wheelhouse
62 mv ./wheels ./wheelhouse 62 mv ./wheels ./wheelhouse
63 63
64 - - uses: actions/upload-artifact@v2 64 + - uses: actions/upload-artifact@v3
65 with: 65 with:
66 path: ./wheelhouse/*.whl 66 path: ./wheelhouse/*.whl
67 67
@@ -26,7 +26,7 @@ jobs: @@ -26,7 +26,7 @@ jobs:
26 os: [macos-latest] 26 os: [macos-latest]
27 27
28 steps: 28 steps:
29 - - uses: actions/checkout@v2 29 + - uses: actions/checkout@v4
30 30
31 - name: Build iOS 31 - name: Build iOS
32 shell: bash 32 shell: bash
@@ -57,7 +57,7 @@ jobs: @@ -57,7 +57,7 @@ jobs:
57 57
58 ls -lh 58 ls -lh
59 59
60 - - uses: actions/upload-artifact@v2 60 + - uses: actions/upload-artifact@v3
61 with: 61 with:
62 name: sherpa-onnx-ios-libs 62 name: sherpa-onnx-ios-libs
63 path: ./build-ios 63 path: ./build-ios
@@ -23,7 +23,7 @@ jobs: @@ -23,7 +23,7 @@ jobs:
23 os: [ubuntu-latest, windows-latest, macos-latest] 23 os: [ubuntu-latest, windows-latest, macos-latest]
24 24
25 steps: 25 steps:
26 - - uses: actions/checkout@v2 26 + - uses: actions/checkout@v4
27 # see https://cibuildwheel.readthedocs.io/en/stable/changelog/ 27 # see https://cibuildwheel.readthedocs.io/en/stable/changelog/
28 # for a list of versions 28 # for a list of versions
29 - name: Build wheels 29 - name: Build wheels
@@ -42,7 +42,7 @@ jobs: @@ -42,7 +42,7 @@ jobs:
42 ls -lh ./wheelhouse/*.whl 42 ls -lh ./wheelhouse/*.whl
43 unzip -l ./wheelhouse/*.whl 43 unzip -l ./wheelhouse/*.whl
44 44
45 - - uses: actions/upload-artifact@v2 45 + - uses: actions/upload-artifact@v3
46 with: 46 with:
47 name: ${{ matrix.os }}-wheels 47 name: ${{ matrix.os }}-wheels
48 path: ./wheelhouse/*.whl 48 path: ./wheelhouse/*.whl
@@ -53,7 +53,7 @@ jobs: @@ -53,7 +53,7 @@ jobs:
53 needs: build-libs 53 needs: build-libs
54 54
55 steps: 55 steps:
56 - - uses: actions/checkout@v2 56 + - uses: actions/checkout@v4
57 57
58 - name: Retrieve artifact from ubuntu-latest 58 - name: Retrieve artifact from ubuntu-latest
59 uses: actions/download-artifact@v2 59 uses: actions/download-artifact@v2
@@ -119,7 +119,7 @@ jobs: @@ -119,7 +119,7 @@ jobs:
119 ./run.sh 119 ./run.sh
120 ls -lh packages 120 ls -lh packages
121 121
122 - - uses: actions/upload-artifact@v2 122 + - uses: actions/upload-artifact@v3
123 name: upload nuget packages 123 name: upload nuget packages
124 with: 124 with:
125 name: nuget-packages 125 name: nuget-packages
@@ -19,7 +19,7 @@ jobs: @@ -19,7 +19,7 @@ jobs:
19 model: ["tiny.en", "base.en", "small.en", "medium.en", "tiny", "base", "small", "medium", "large", "large-v1", "large-v2"] 19 model: ["tiny.en", "base.en", "small.en", "medium.en", "tiny", "base", "small", "medium", "large", "large-v1", "large-v2"]
20 20
21 steps: 21 steps:
22 - - uses: actions/checkout@v2 22 + - uses: actions/checkout@v4
23 23
24 - name: Install dependencies 24 - name: Install dependencies
25 shell: bash 25 shell: bash
@@ -40,10 +40,15 @@ jobs: @@ -40,10 +40,15 @@ jobs:
40 os: [ubuntu-latest, macos-latest] 40 os: [ubuntu-latest, macos-latest]
41 41
42 steps: 42 steps:
43 - - uses: actions/checkout@v2 43 + - uses: actions/checkout@v4
44 with: 44 with:
45 fetch-depth: 0 45 fetch-depth: 0
46 46
  47 + - name: ccache
  48 + uses: hendrikmuhs/ccache-action@v1.2
  49 + with:
  50 + key: ${{ matrix.os }}
  51 +
47 - name: Display kotlin version 52 - name: Display kotlin version
48 shell: bash 53 shell: bash
49 run: | 54 run: |
@@ -58,5 +63,9 @@ jobs: @@ -58,5 +63,9 @@ jobs:
58 - name: Run JNI test 63 - name: Run JNI test
59 shell: bash 64 shell: bash
60 run: | 65 run: |
  66 + export CMAKE_CXX_COMPILER_LAUNCHER=ccache
  67 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  68 + cmake --version
  69 +
61 cd ./kotlin-api-examples 70 cd ./kotlin-api-examples
62 ./run.sh 71 ./run.sh
@@ -50,13 +50,22 @@ jobs: @@ -50,13 +50,22 @@ jobs:
50 build_type: [Release, Debug] 50 build_type: [Release, Debug]
51 51
52 steps: 52 steps:
53 - - uses: actions/checkout@v3 53 + - uses: actions/checkout@v4
54 with: 54 with:
55 fetch-depth: 0 55 fetch-depth: 0
56 56
  57 + - name: ccache
  58 + uses: hendrikmuhs/ccache-action@v1.2
  59 + with:
  60 + key: ${{ matrix.os }}-${{ matrix.build_type }}-gpu
  61 +
57 - name: Configure CMake 62 - name: Configure CMake
58 shell: bash 63 shell: bash
59 run: | 64 run: |
  65 + export CMAKE_CXX_COMPILER_LAUNCHER=ccache
  66 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  67 + cmake --version
  68 +
60 mkdir build 69 mkdir build
61 cd build 70 cd build
62 cmake -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=./install -DBUILD_SHARED_LIBS=ON -DSHERPA_ONNX_ENABLE_GPU=ON .. 71 cmake -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=./install -DBUILD_SHARED_LIBS=ON -DSHERPA_ONNX_ENABLE_GPU=ON ..
@@ -64,6 +73,8 @@ jobs: @@ -64,6 +73,8 @@ jobs:
64 - name: Build sherpa-onnx for ubuntu 73 - name: Build sherpa-onnx for ubuntu
65 shell: bash 74 shell: bash
66 run: | 75 run: |
  76 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  77 +
67 cd build 78 cd build
68 make -j2 79 make -j2
69 make install 80 make install
@@ -51,13 +51,22 @@ jobs: @@ -51,13 +51,22 @@ jobs:
51 shared_lib: [ON, OFF] 51 shared_lib: [ON, OFF]
52 52
53 steps: 53 steps:
54 - - uses: actions/checkout@v3 54 + - uses: actions/checkout@v4
55 with: 55 with:
56 fetch-depth: 0 56 fetch-depth: 0
57 57
  58 + - name: ccache
  59 + uses: hendrikmuhs/ccache-action@v1.2
  60 + with:
  61 + key: ${{ matrix.os }}-${{ matrix.build_type }}-shared-${{ matrix.shared_lib }}
  62 +
58 - name: Configure CMake 63 - name: Configure CMake
59 shell: bash 64 shell: bash
60 run: | 65 run: |
  66 + export CMAKE_CXX_COMPILER_LAUNCHER=ccache
  67 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  68 + cmake --version
  69 +
61 mkdir build 70 mkdir build
62 cd build 71 cd build
63 cmake -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -D BUILD_SHARED_LIBS=${{ matrix.shared_lib }} -DCMAKE_INSTALL_PREFIX=./install .. 72 cmake -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -D BUILD_SHARED_LIBS=${{ matrix.shared_lib }} -DCMAKE_INSTALL_PREFIX=./install ..
@@ -65,6 +74,8 @@ jobs: @@ -65,6 +74,8 @@ jobs:
65 - name: Build sherpa-onnx for ubuntu 74 - name: Build sherpa-onnx for ubuntu
66 shell: bash 75 shell: bash
67 run: | 76 run: |
  77 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  78 +
68 cd build 79 cd build
69 make -j2 80 make -j2
70 make install 81 make install
@@ -46,13 +46,22 @@ jobs: @@ -46,13 +46,22 @@ jobs:
46 build_type: [Release, Debug] 46 build_type: [Release, Debug]
47 47
48 steps: 48 steps:
49 - - uses: actions/checkout@v3 49 + - uses: actions/checkout@v4
50 with: 50 with:
51 fetch-depth: 0 51 fetch-depth: 0
52 52
  53 + - name: ccache
  54 + uses: hendrikmuhs/ccache-action@v1.2
  55 + with:
  56 + key: ${{ matrix.os }}-${{ matrix.build_type }}
  57 +
53 - name: Configure CMake 58 - name: Configure CMake
54 shell: bash 59 shell: bash
55 run: | 60 run: |
  61 + export CMAKE_CXX_COMPILER_LAUNCHER=ccache
  62 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  63 + cmake --version
  64 +
56 mkdir build 65 mkdir build
57 cd build 66 cd build
58 cmake -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_INSTALL_PREFIX=./install .. 67 cmake -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' -DCMAKE_INSTALL_PREFIX=./install ..
@@ -60,6 +69,8 @@ jobs: @@ -60,6 +69,8 @@ jobs:
60 - name: Build sherpa-onnx for macos 69 - name: Build sherpa-onnx for macos
61 shell: bash 70 shell: bash
62 run: | 71 run: |
  72 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  73 +
63 cd build 74 cd build
64 make -j2 75 make -j2
65 make install 76 make install
@@ -40,7 +40,7 @@ jobs: @@ -40,7 +40,7 @@ jobs:
40 arch: [x64] 40 arch: [x64]
41 41
42 steps: 42 steps:
43 - - uses: actions/checkout@v2 43 + - uses: actions/checkout@v4
44 with: 44 with:
45 fetch-depth: 0 45 fetch-depth: 0
46 46
@@ -90,13 +90,13 @@ jobs: @@ -90,13 +90,13 @@ jobs:
90 ls -lh 90 ls -lh
91 91
92 - name: Upload artifact 92 - name: Upload artifact
93 - uses: actions/upload-artifact@v2 93 + uses: actions/upload-artifact@v3
94 with: 94 with:
95 name: streaming-speech-recognition-${{ matrix.arch }} 95 name: streaming-speech-recognition-${{ matrix.arch }}
96 path: ./mfc-examples/${{ matrix.arch }}/Release/StreamingSpeechRecognition.exe 96 path: ./mfc-examples/${{ matrix.arch }}/Release/StreamingSpeechRecognition.exe
97 97
98 - name: Upload artifact 98 - name: Upload artifact
99 - uses: actions/upload-artifact@v2 99 + uses: actions/upload-artifact@v3
100 with: 100 with:
101 name: non-streaming-speech-recognition-${{ matrix.arch }} 101 name: non-streaming-speech-recognition-${{ matrix.arch }}
102 path: ./mfc-examples/${{ matrix.arch }}/Release/NonStreamingSpeechRecognition.exe 102 path: ./mfc-examples/${{ matrix.arch }}/Release/NonStreamingSpeechRecognition.exe
@@ -32,7 +32,7 @@ jobs: @@ -32,7 +32,7 @@ jobs:
32 python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] 32 python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
33 33
34 steps: 34 steps:
35 - - uses: actions/checkout@v2 35 + - uses: actions/checkout@v4
36 with: 36 with:
37 fetch-depth: 0 37 fetch-depth: 0
38 38
@@ -44,13 +44,22 @@ jobs: @@ -44,13 +44,22 @@ jobs:
44 lib_type: [shared, static] 44 lib_type: [shared, static]
45 45
46 steps: 46 steps:
47 - - uses: actions/checkout@v2 47 + - uses: actions/checkout@v4
48 with: 48 with:
49 fetch-depth: 0 49 fetch-depth: 0
50 50
  51 + - name: ccache
  52 + uses: hendrikmuhs/ccache-action@v1.2
  53 + with:
  54 + key: ${{ matrix.os }}-${{ matrix.build_type }}-lib-${{ matrix.lib_type }}
  55 +
51 - name: Configure CMake 56 - name: Configure CMake
52 shell: bash 57 shell: bash
53 run: | 58 run: |
  59 + export CMAKE_CXX_COMPILER_LAUNCHER=ccache
  60 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  61 + cmake --version
  62 +
54 mkdir build 63 mkdir build
55 cd build 64 cd build
56 if [[ ${{ matrix.lib_type }} == "shared" ]]; then 65 if [[ ${{ matrix.lib_type }} == "shared" ]]; then
@@ -62,6 +71,8 @@ jobs: @@ -62,6 +71,8 @@ jobs:
62 - name: Build sherpa-onnx for ${{ matrix.os }} ${{ matrix.build_type }} ${{ matrix.lib_type }} 71 - name: Build sherpa-onnx for ${{ matrix.os }} ${{ matrix.build_type }} ${{ matrix.lib_type }}
63 shell: bash 72 shell: bash
64 run: | 73 run: |
  74 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  75 +
65 cd build 76 cd build
66 make -j2 77 make -j2
67 make install 78 make install
@@ -31,7 +31,7 @@ jobs: @@ -31,7 +31,7 @@ jobs:
31 os: [ubuntu-latest] 31 os: [ubuntu-latest]
32 32
33 steps: 33 steps:
34 - - uses: actions/checkout@v2 34 + - uses: actions/checkout@v4
35 35
36 - name: SSH to GitHub 36 - name: SSH to GitHub
37 run: | 37 run: |
@@ -58,7 +58,7 @@ jobs: @@ -58,7 +58,7 @@ jobs:
58 ls -lh ./wheelhouse/*.whl 58 ls -lh ./wheelhouse/*.whl
59 unzip -l ./wheelhouse/*.whl 59 unzip -l ./wheelhouse/*.whl
60 60
61 - - uses: actions/upload-artifact@v2 61 + - uses: actions/upload-artifact@v3
62 with: 62 with:
63 name: ${{ matrix.os }}-wheels-for-go 63 name: ${{ matrix.os }}-wheels-for-go
64 path: ./wheelhouse/*.whl 64 path: ./wheelhouse/*.whl
@@ -73,10 +73,20 @@ jobs: @@ -73,10 +73,20 @@ jobs:
73 arch: [x86_64, arm64] 73 arch: [x86_64, arm64]
74 74
75 steps: 75 steps:
76 - - uses: actions/checkout@v2 76 + - uses: actions/checkout@v4
  77 +
  78 + - name: ccache
  79 + uses: hendrikmuhs/ccache-action@v1.2
  80 + with:
  81 + key: ${{ matrix.os }}-${{ matrix.arch }}
  82 +
77 - name: Configure CMake 83 - name: Configure CMake
78 shell: bash 84 shell: bash
79 run: | 85 run: |
  86 + export CMAKE_CXX_COMPILER_LAUNCHER=ccache
  87 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  88 + cmake --version
  89 +
80 mkdir build 90 mkdir build
81 cd build 91 cd build
82 cmake -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -D BUILD_SHARED_LIBS=ON -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} -DCMAKE_INSTALL_PREFIX=./install .. 92 cmake -D CMAKE_BUILD_TYPE=${{ matrix.build_type }} -D BUILD_SHARED_LIBS=ON -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} -DCMAKE_INSTALL_PREFIX=./install ..
@@ -84,6 +94,8 @@ jobs: @@ -84,6 +94,8 @@ jobs:
84 - name: Build sherpa-onnx for macOS ${{ matrix.arch }} 94 - name: Build sherpa-onnx for macOS ${{ matrix.arch }}
85 shell: bash 95 shell: bash
86 run: | 96 run: |
  97 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  98 +
87 cd build 99 cd build
88 make -j2 100 make -j2
89 make install 101 make install
@@ -93,7 +105,7 @@ jobs: @@ -93,7 +105,7 @@ jobs:
93 105
94 file install/lib/lib* 106 file install/lib/lib*
95 107
96 - - uses: actions/upload-artifact@v2 108 + - uses: actions/upload-artifact@v3
97 with: 109 with:
98 name: ${{ matrix.os }}-for-${{ matrix.arch }} 110 name: ${{ matrix.os }}-for-${{ matrix.arch }}
99 path: ./build/install/lib/ 111 path: ./build/install/lib/
@@ -107,7 +119,7 @@ jobs: @@ -107,7 +119,7 @@ jobs:
107 os: [windows-latest] 119 os: [windows-latest]
108 arch: [x64, Win32] 120 arch: [x64, Win32]
109 steps: 121 steps:
110 - - uses: actions/checkout@v2 122 + - uses: actions/checkout@v4
111 with: 123 with:
112 fetch-depth: 0 124 fetch-depth: 0
113 125
@@ -131,7 +143,7 @@ jobs: @@ -131,7 +143,7 @@ jobs:
131 ls -lh install/bin 143 ls -lh install/bin
132 144
133 - name: Upload artifact 145 - name: Upload artifact
134 - uses: actions/upload-artifact@v2 146 + uses: actions/upload-artifact@v3
135 with: 147 with:
136 name: sherpa-onnx-go-windows-${{ matrix.arch }} 148 name: sherpa-onnx-go-windows-${{ matrix.arch }}
137 path: ./build/install/lib/ 149 path: ./build/install/lib/
@@ -142,7 +154,7 @@ jobs: @@ -142,7 +154,7 @@ jobs:
142 needs: [linux-x86_64_wheel, macOS, windows] 154 needs: [linux-x86_64_wheel, macOS, windows]
143 155
144 steps: 156 steps:
145 - - uses: actions/checkout@v2 157 + - uses: actions/checkout@v4
146 158
147 - name: Add SSH key 159 - name: Add SSH key
148 run: | 160 run: |
@@ -39,10 +39,15 @@ jobs: @@ -39,10 +39,15 @@ jobs:
39 os: [ubuntu-latest] 39 os: [ubuntu-latest]
40 40
41 steps: 41 steps:
42 - - uses: actions/checkout@v2 42 + - uses: actions/checkout@v4
43 with: 43 with:
44 fetch-depth: 0 44 fetch-depth: 0
45 45
  46 + - name: ccache
  47 + uses: hendrikmuhs/ccache-action@v1.2
  48 + with:
  49 + key: ${{ matrix.os }}
  50 +
46 - name: Display java version 51 - name: Display java version
47 shell: bash 52 shell: bash
48 run: | 53 run: |
@@ -52,5 +57,9 @@ jobs: @@ -52,5 +57,9 @@ jobs:
52 - name: Run java test 57 - name: Run java test
53 shell: bash 58 shell: bash
54 run: | 59 run: |
  60 + export CMAKE_CXX_COMPILER_LAUNCHER=ccache
  61 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  62 + cmake --version
  63 +
55 cd ./java-api-examples 64 cd ./java-api-examples
56 ./runtest.sh 65 ./runtest.sh
@@ -43,10 +43,15 @@ jobs: @@ -43,10 +43,15 @@ jobs:
43 python-version: "3.10" 43 python-version: "3.10"
44 44
45 steps: 45 steps:
46 - - uses: actions/checkout@v3 46 + - uses: actions/checkout@v4
47 with: 47 with:
48 fetch-depth: 0 48 fetch-depth: 0
49 49
  50 + - name: ccache
  51 + uses: hendrikmuhs/ccache-action@v1.2
  52 + with:
  53 + key: ${{ matrix.os }}-python-${{ matrix.python-version }}
  54 +
50 - name: Setup Python 55 - name: Setup Python
51 uses: actions/setup-python@v2 56 uses: actions/setup-python@v2
52 with: 57 with:
@@ -60,6 +65,10 @@ jobs: @@ -60,6 +65,10 @@ jobs:
60 - name: Install sherpa-onnx 65 - name: Install sherpa-onnx
61 shell: bash 66 shell: bash
62 run: | 67 run: |
  68 + export CMAKE_CXX_COMPILER_LAUNCHER=ccache
  69 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  70 + cmake --version
  71 +
63 python3 -m pip install --verbose . 72 python3 -m pip install --verbose .
64 73
65 - name: Test sherpa-onnx 74 - name: Test sherpa-onnx
@@ -44,7 +44,7 @@ jobs: @@ -44,7 +44,7 @@ jobs:
44 fail-fast: false 44 fail-fast: false
45 45
46 steps: 46 steps:
47 - - uses: actions/checkout@v2 47 + - uses: actions/checkout@v4
48 with: 48 with:
49 fetch-depth: 0 49 fetch-depth: 0
50 50
@@ -42,7 +42,7 @@ jobs: @@ -42,7 +42,7 @@ jobs:
42 os: [ubuntu-latest, macos-latest, windows-latest] 42 os: [ubuntu-latest, macos-latest, windows-latest]
43 43
44 steps: 44 steps:
45 - - uses: actions/checkout@v2 45 + - uses: actions/checkout@v4
46 with: 46 with:
47 fetch-depth: 0 47 fetch-depth: 0
48 48
@@ -34,7 +34,7 @@ jobs: @@ -34,7 +34,7 @@ jobs:
34 arch: x86 # use 386 for GOARCH 34 arch: x86 # use 386 for GOARCH
35 35
36 steps: 36 steps:
37 - - uses: actions/checkout@v3 37 + - uses: actions/checkout@v4
38 with: 38 with:
39 fetch-depth: 0 39 fetch-depth: 0
40 - uses: actions/setup-go@v4 40 - uses: actions/setup-go@v4
@@ -26,7 +26,7 @@ jobs: @@ -26,7 +26,7 @@ jobs:
26 arch: amd64 26 arch: amd64
27 27
28 steps: 28 steps:
29 - - uses: actions/checkout@v3 29 + - uses: actions/checkout@v4
30 with: 30 with:
31 fetch-depth: 0 31 fetch-depth: 0
32 32
@@ -35,7 +35,7 @@ jobs: @@ -35,7 +35,7 @@ jobs:
35 python-version: "3.7" 35 python-version: "3.7"
36 36
37 steps: 37 steps:
38 - - uses: actions/checkout@v3 38 + - uses: actions/checkout@v4
39 with: 39 with:
40 fetch-depth: 0 40 fetch-depth: 0
41 41
@@ -28,10 +28,15 @@ jobs: @@ -28,10 +28,15 @@ jobs:
28 model_type: ["transducer", "paraformer", "nemo_ctc", "whisper", "tdnn"] 28 model_type: ["transducer", "paraformer", "nemo_ctc", "whisper", "tdnn"]
29 29
30 steps: 30 steps:
31 - - uses: actions/checkout@v2 31 + - uses: actions/checkout@v4
32 with: 32 with:
33 fetch-depth: 0 33 fetch-depth: 0
34 34
  35 + - name: ccache
  36 + uses: hendrikmuhs/ccache-action@v1.2
  37 + with:
  38 + key: ${{ matrix.os }}-python-${{ matrix.python-version }}
  39 +
35 - name: Setup Python ${{ matrix.python-version }} 40 - name: Setup Python ${{ matrix.python-version }}
36 uses: actions/setup-python@v2 41 uses: actions/setup-python@v2
37 with: 42 with:
@@ -45,10 +50,13 @@ jobs: @@ -45,10 +50,13 @@ jobs:
45 - name: Install sherpa-onnx 50 - name: Install sherpa-onnx
46 shell: bash 51 shell: bash
47 run: | 52 run: |
  53 + export CMAKE_CXX_COMPILER_LAUNCHER=ccache
  54 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  55 + cmake --version
  56 +
48 python3 -m pip install --no-deps --verbose . 57 python3 -m pip install --no-deps --verbose .
49 python3 -m pip install websockets 58 python3 -m pip install websockets
50 59
51 -  
52 - name: Start server for transducer models 60 - name: Start server for transducer models
53 if: matrix.model_type == 'transducer' 61 if: matrix.model_type == 'transducer'
54 shell: bash 62 shell: bash
@@ -28,10 +28,15 @@ jobs: @@ -28,10 +28,15 @@ jobs:
28 model_type: ["transducer", "paraformer"] 28 model_type: ["transducer", "paraformer"]
29 29
30 steps: 30 steps:
31 - - uses: actions/checkout@v2 31 + - uses: actions/checkout@v4
32 with: 32 with:
33 fetch-depth: 0 33 fetch-depth: 0
34 34
  35 + - name: ccache
  36 + uses: hendrikmuhs/ccache-action@v1.2
  37 + with:
  38 + key: ${{ matrix.os }}-python-${{ matrix.python-version }}
  39 +
35 - name: Setup Python ${{ matrix.python-version }} 40 - name: Setup Python ${{ matrix.python-version }}
36 uses: actions/setup-python@v2 41 uses: actions/setup-python@v2
37 with: 42 with:
@@ -45,6 +50,10 @@ jobs: @@ -45,6 +50,10 @@ jobs:
45 - name: Install sherpa-onnx 50 - name: Install sherpa-onnx
46 shell: bash 51 shell: bash
47 run: | 52 run: |
  53 + export CMAKE_CXX_COMPILER_LAUNCHER=ccache
  54 + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  55 + cmake --version
  56 +
48 python3 -m pip install --no-deps --verbose . 57 python3 -m pip install --no-deps --verbose .
49 python3 -m pip install websockets 58 python3 -m pip install websockets
50 59
@@ -46,7 +46,7 @@ jobs: @@ -46,7 +46,7 @@ jobs:
46 os: [windows-latest] 46 os: [windows-latest]
47 47
48 steps: 48 steps:
49 - - uses: actions/checkout@v2 49 + - uses: actions/checkout@v4
50 with: 50 with:
51 fetch-depth: 0 51 fetch-depth: 0
52 52
@@ -47,7 +47,7 @@ jobs: @@ -47,7 +47,7 @@ jobs:
47 shared_lib: [ON, OFF] 47 shared_lib: [ON, OFF]
48 48
49 steps: 49 steps:
50 - - uses: actions/checkout@v3 50 + - uses: actions/checkout@v4
51 with: 51 with:
52 fetch-depth: 0 52 fetch-depth: 0
53 53
@@ -47,7 +47,7 @@ jobs: @@ -47,7 +47,7 @@ jobs:
47 shared_lib: [ON, OFF] 47 shared_lib: [ON, OFF]
48 48
49 steps: 49 steps:
50 - - uses: actions/checkout@v3 50 + - uses: actions/checkout@v4
51 with: 51 with:
52 fetch-depth: 0 52 fetch-depth: 0
53 53