diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0d6ea369..ddc3579e7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,29 +16,77 @@ on: env: TAG_VERSION: ${{ github.event.inputs.version == 0 && github.ref_name || github.event.inputs.version }} BAZEL_CACHE_URL: https://storage.googleapis.com/bazel_remote_cache_0/gh_actions + TOOLS_VERSION: 15.2.1 + TOOLS_LINK: https://www.xmos.ai/download/Tools-15---Linux-64(15_2_1).tgz jobs: + build-release-archive: + name: Build release archive + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + ref: ${{ env.TAG_VERSION }} + - name: Build setup + shell: bash + run: | + sudo apt-get -y -qq install libncurses5 + + cd $GITHUB_WORKSPACE/third_party/lib_tflite_micro + make patch + + wget -nv "${{ env.TOOLS_LINK }}?key=${{ secrets.TOOLS_KEY }}" -O tools.tgz + tar xf tools.tgz + cd XMOS/XTC/${{ env.TOOLS_VERSION }} + source ./SetEnv + + cd $GITHUB_WORKSPACE/third_party/lib_tflite_micro + mkdir -p build + cd build + cmake .. --toolchain=../lib_tflite_micro/submodules/xmos_cmake_toolchain/xs3a.cmake + make create_zip -j4 + + - uses: actions/upload-artifact@v3 + with: + name: xcore-archive + path: third_party/lib_tflite_micro/build/*.zip + + + macos-release-wheel: name: Build release wheels for macOS + needs: [build-release-archive] runs-on: macos-latest strategy: matrix: python-version: [3.8] fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive fetch-depth: 0 ref: ${{ env.TAG_VERSION }} - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - uses: google-github-actions/auth@v0 + - uses: google-github-actions/auth@v1 continue-on-error: true with: credentials_json: ${{ secrets.BAZEL_REMOTE_CACHE_JSON_KEY }} + - uses: actions/download-artifact@v3 + with: + name: xcore-archive + path: python/xmos_ai_tools/xinterpreters/device + - name: Prepare release archive + shell: bash + run: | + cd $GITHUB_WORKSPACE/python/xmos_ai_tools/xinterpreters/device + unzip release_archive.zip + rm release_archive.zip - name: Build macOS wheels env: SETUPTOOLS_SCM_PRETEND_VERSION: ${{ env.TAG_VERSION }} @@ -62,9 +110,9 @@ jobs: bazelisk build //:xcore-opt --copt=-fvisibility=hidden --copt=-mavx --copt=-mmacosx-version-min=10.13 --linkopt=-mmacosx-version-min=10.13 --linkopt=-dead_strip --distinct_host_configuration=false --//:disable_version_check cd $GITHUB_WORKSPACE/python - python setup.py bdist_wheel --plat macosx_10_9_x86_64 + python setup.py bdist_wheel --plat macosx_10_14_x86_64 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ runner.os }}-wheels path: python/dist @@ -73,24 +121,35 @@ jobs: macos-arm-release-wheel: name: Build release wheels for macOS arm64 + needs: [build-release-archive] runs-on: macos-11 strategy: matrix: python-version: [3.8] fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive fetch-depth: 0 ref: ${{ env.TAG_VERSION }} - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - uses: google-github-actions/auth@v0 + - uses: google-github-actions/auth@v1 continue-on-error: true with: credentials_json: ${{ secrets.BAZEL_REMOTE_CACHE_JSON_KEY }} + - uses: actions/download-artifact@v3 + with: + name: xcore-archive + path: python/xmos_ai_tools/xinterpreters/device + - name: Prepare release archive + shell: bash + run: | + cd $GITHUB_WORKSPACE/python/xmos_ai_tools/xinterpreters/device + unzip release_archive.zip + rm release_archive.zip - name: Build macOS arm wheels env: SETUPTOOLS_SCM_PRETEND_VERSION: ${{ env.TAG_VERSION }} @@ -117,7 +176,7 @@ jobs: cd $GITHUB_WORKSPACE/python python setup.py bdist_wheel --plat-name macosx_11_0_arm64 - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ runner.os }}-arm-wheels path: python/dist @@ -126,24 +185,35 @@ jobs: manylinux-release-wheel: name: Build release wheels for manylinux2014 + needs: [build-release-archive] runs-on: ubuntu-latest strategy: matrix: python-version: [3.8] fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive fetch-depth: 0 ref: ${{ env.TAG_VERSION }} - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - uses: google-github-actions/auth@v0 + - uses: google-github-actions/auth@v1 continue-on-error: true with: credentials_json: ${{ secrets.BAZEL_REMOTE_CACHE_JSON_KEY }} + - uses: actions/download-artifact@v3 + with: + name: xcore-archive + path: python/xmos_ai_tools/xinterpreters/device + - name: Prepare release archive + shell: bash + run: | + cd $GITHUB_WORKSPACE/python/xmos_ai_tools/xinterpreters/device + unzip release_archive.zip + rm release_archive.zip - name: Build manylinux2014 wheels # The SETUPTOOLS_SCM_PRETEND_VERSION var is passed via docker to the # python setup.py script to add the version info for the wheel file. @@ -173,7 +243,7 @@ jobs: auditwheel repair --plat manylinux2014_x86_64 $f done - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ runner.os }}-wheels # auditwheel creates the output wheel in the wheelhouse folder @@ -183,21 +253,22 @@ jobs: windows-release-wheel: name: Build release wheels for windows + needs: [build-release-archive] runs-on: windows-2019 strategy: matrix: python-version: [3.8] fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: recursive fetch-depth: 0 ref: ${{ env.TAG_VERSION }} - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - uses: google-github-actions/auth@v0 + - uses: google-github-actions/auth@v1 continue-on-error: true with: credentials_json: ${{ secrets.BAZEL_REMOTE_CACHE_JSON_KEY }} @@ -210,6 +281,16 @@ jobs: shell: pwsh run: | (Get-CimInstance Win32_PageFileUsage).AllocatedBaseSize + - uses: actions/download-artifact@v3 + with: + name: xcore-archive + path: python/xmos_ai_tools/xinterpreters/device + - name: Prepare release archive + shell: cmd + run: | + cd %GITHUB_WORKSPACE%/python/xmos_ai_tools/xinterpreters/device + 7z x release_archive.zip + del release_archive.zip - name: Build xcore-opt and xtflm-interpreter shell: cmd run: | @@ -237,7 +318,7 @@ jobs: run: | cd python python setup.py bdist_wheel - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: ${{ runner.os }}-wheels path: python/dist @@ -250,22 +331,22 @@ jobs: needs: [macos-release-wheel, macos-arm-release-wheel, manylinux-release-wheel, windows-release-wheel] runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: macOS-wheels path: macOS-wheels if: ${{ needs.macos-release-wheel.result == 'success' }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: macOS-arm-wheels path: macOS-arm-wheels if: ${{ needs.macos-arm-release-wheel.result == 'success' }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: Linux-wheels path: Linux-wheels if: ${{ needs.manylinux-release-wheel.result == 'success' }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v3 with: name: Windows-wheels path: Windows-wheels diff --git a/xformer/Version.h b/xformer/Version.h index 7e41bf124..dc81959b7 100644 --- a/xformer/Version.h +++ b/xformer/Version.h @@ -8,7 +8,7 @@ namespace xformer { unsigned majorVersion = 1; unsigned minorVersion = 1; -unsigned patchVersion = 0; +unsigned patchVersion = 1; } // namespace xformer