diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 72e89642..7ca7bf98 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -7,11 +7,70 @@ on: - '*' jobs: - build: - runs-on: windows-latest - name: "build: ${{ matrix.arch }} ${{ matrix.config }} ${{ matrix.link }}" + create_release: + name: Create release + runs-on: ubuntu-latest + outputs: + upload_url: ${{ steps.create_release.outputs.upload_url }} + steps: + - name: Create release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + draft: false + prerelease: false + build_linux: + name: "linux build: ${{ matrix.arch }}" + runs-on: ubuntu-latest + needs: create_release # we need to know the upload URL strategy: - fail-fast: false + fail-fast: true + matrix: + arch: [x64, aarch64, armv7] + steps: + - uses: actions/checkout@v3 + - name: configure + run: | + export CFLAGS='-D_FILE_OFFSET_BITS=64' && \ + ./autogen.sh && \ + ./configure \ + --without-pcaudiolib \ + --without-klatt \ + --without-speechplayer \ + --without-mbrola \ + --without-sonic \ + --with-extdict-cmn \ + --with-extdict-ru \ + --prefix=_install/espeak-ng + - name: make + run: | + make + - name: install + run: | + make install + - name: package + run: | + cd _install && \ + tar -czf linux_${{ matrix.arch }}.tar.gz espeak-ng/ + - name: upload + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ needs.create_release.outputs.upload_url }} + asset_path: _install/linux_${{ matrix.arch }}.tar.gz + asset_name: linux_${{ matrix.arch }}.tar.gz + asset_content_type: application/octet-stream + build_windows: + name: "windows build: ${{ matrix.arch }}" + runs-on: windows-latest + needs: create_release # we need to know the upload URL + strategy: + fail-fast: true matrix: arch: [x64] steps: @@ -29,22 +88,12 @@ jobs: run: | cd _install Compress-Archive -LiteralPath espeak-ng -DestinationPath windows_amd64.zip - - name: release - uses: actions/create-release@v1 - id: create_release - env: - GITHUB_TOKEN: ${{ github.token }} - with: - draft: false - prerelease: false - release_name: ${{ github.ref }} - tag_name: ${{ github.ref }} - name: upload uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: _install//windows_amd64.zip + upload_url: ${{ needs.create_release.outputs.upload_url }} + asset_path: _install/windows_amd64.zip asset_name: windows-amd64.zip asset_content_type: application/zip