Add export CGO_ENABLED=1 to all GO examples. (#3069) #114
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test-build-wheel | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'setup.py' | |
| - '.github/workflows/test-build-wheel.yaml' | |
| - 'cmake/**' | |
| - 'sherpa-onnx/csrc/*' | |
| - 'sherpa-onnx/python/**' | |
| workflow_dispatch: | |
| concurrency: | |
| group: test-build-wheel-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test-build-wheel: | |
| name: ${{ matrix.os }} ${{ matrix.python-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # See https://github.com/actions/runner-images | |
| include: | |
| - os: ubuntu-latest | |
| python-version: "3.8" | |
| - os: ubuntu-latest | |
| python-version: "3.9" | |
| - os: ubuntu-latest | |
| python-version: "3.10" | |
| - os: ubuntu-latest | |
| python-version: "3.11" | |
| - os: ubuntu-latest | |
| python-version: "3.12" | |
| - os: ubuntu-latest | |
| python-version: "3.13" | |
| - os: ubuntu-24.04-arm | |
| python-version: "3.8" | |
| - os: ubuntu-24.04-arm | |
| python-version: "3.9" | |
| - os: ubuntu-24.04-arm | |
| python-version: "3.10" | |
| - os: ubuntu-24.04-arm | |
| python-version: "3.11" | |
| - os: ubuntu-24.04-arm | |
| python-version: "3.12" | |
| - os: ubuntu-24.04-arm | |
| python-version: "3.13" | |
| - os: macos-15-intel | |
| python-version: "3.8" | |
| - os: macos-15-intel | |
| python-version: "3.9" | |
| - os: macos-15-intel | |
| python-version: "3.10" | |
| - os: macos-15-intel | |
| python-version: "3.11" | |
| - os: macos-latest | |
| python-version: "3.12" | |
| - os: macos-latest | |
| python-version: "3.13" | |
| - os: windows-2022 | |
| python-version: "3.7" | |
| - os: windows-2022 | |
| python-version: "3.8" | |
| - os: windows-2022 | |
| python-version: "3.9" | |
| - os: windows-2022 | |
| python-version: "3.10" | |
| - os: windows-2022 | |
| python-version: "3.11" | |
| - os: windows-2022 | |
| python-version: "3.12" | |
| - os: windows-2022 | |
| python-version: "3.13" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Update version | |
| shell: bash | |
| run: | | |
| ./new-release.sh | |
| git diff . | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ matrix.os }}-${{ matrix.python_version }} | |
| - name: Install python dependencies | |
| shell: bash | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| python3 -m pip install wheel twine setuptools | |
| - name: Build | |
| shell: bash | |
| run: | | |
| export CMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
| cmake --version | |
| export SHERPA_ONNX_MAKE_ARGS="VERBOSE=1 -j2" | |
| python3 setup.py bdist_wheel | |
| ls -lh dist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheel-${{ matrix.os }}-${{ matrix.python-version }} | |
| path: ./dist/*.whl | |
| - name: Display wheel | |
| shell: bash | |
| run: | | |
| ls -lh dist | |
| cd dist | |
| mkdir t | |
| cd t | |
| unzip ../*.whl | |
| ls -lh sherpa_onnx/lib | |
| file sherpa_onnx/lib/* | |
| - name: Install wheel | |
| shell: bash | |
| run: | | |
| pip install --verbose ./dist/*.whl | |
| - name: Test | |
| shell: bash | |
| run: | | |
| which sherpa-onnx | |
| sherpa-onnx --help |