fix wheel download and merge #255
This file contains 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: publish-standalone | |
on: [ push ] | |
env: | |
node_ver: v16.14.0 | |
GIT_TERMINAL_PROMPT: 1 | |
jobs: | |
bundle-bash: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: [ self-hosted, Linux, X64, generic ] | |
format: .tar.xz | |
node_suffix: linux-x64 | |
dist_suffix: linux_x64-v2 | |
- os: [ self-hosted, macOS, X64, generic ] | |
format: .tar.gz | |
node_suffix: darwin-x64 | |
dist_suffix: darwin_x64-v2 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Node distribution | |
run: wget --no-check-certificate -nv http://${{ secrets.LRS_RES_SERVER }}:9000/public/node/${{ env.node_ver }}/node-${{ env.node_ver }}-${{ matrix.node_suffix }}${{ matrix.format }} | |
- name: Extract Node | |
run: | | |
export XZ_OPT="-T0" | |
tar xf node-${{ env.node_ver }}-${{ matrix.node_suffix }}${{ matrix.format }} | |
mv node-${{ env.node_ver }}-${{ matrix.node_suffix }} node | |
- name: Install zx & lisa | |
run: | | |
export PATH=$PWD/node/bin:$PATH | |
export npm_config_prefix=$PWD/node | |
export npm_config_registry=https://registry.npmmirror.com | |
npm prefix -g | |
npm root -g | |
npm bin -g | |
npm i -g zx | |
npm install -g @listenai/lisa | |
npm install -g yarn | |
- name: Install Plugins | |
run: | | |
export PATH=$PWD/node/bin:$PATH | |
export npm_config_prefix=$PWD/node | |
zx main.mjs | |
mv $HOME/.listenai/lisa-zephyr/packages $PWD/node | |
- name: Make bundle | |
run: | | |
cp -vR standalone/bash node/libexec | |
export XZ_OPT="-T0" | |
cd node && tar caf ../csk-integration-bus-${{ matrix.dist_suffix }}${{ matrix.format }} . | |
- name: Upload cache (local) | |
run: | | |
mc cp ./csk-integration-bus-${{ matrix.dist_suffix }}${{ matrix.format }} local/${{ secrets.LRS_MINIO_BUCKET }}/ | |
test-bash: | |
needs: bundle-bash | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: [ self-hosted, Linux, X64, generic ] | |
format: .tar.xz | |
dist_suffix: linux_x64-v2 | |
- os: [ self-hosted, macOS, X64, generic ] | |
format: .tar.gz | |
dist_suffix: darwin_x64-v2 | |
steps: | |
- name: Remove pre-installed Node | |
run: | | |
(which node && rm -f $(which node) && echo Node removed) || echo Already removed | |
- name: Download cache (local) | |
run: | | |
mc cp local/${{ secrets.LRS_MINIO_BUCKET }}/csk-integration-bus-${{ matrix.dist_suffix }}${{ matrix.format }} . | |
- name: Extract LISA | |
run: | | |
mkdir -p $HOME/.listenai/lisa | |
export XZ_OPT="-T0" | |
tar xf csk-integration-bus-${{ matrix.dist_suffix }}${{ matrix.format }} -C $HOME/.listenai/lisa | |
- name: Test LISA | |
run: | | |
export PATH=$HOME/.listenai/lisa/libexec:$PATH | |
export PATH=$HOME/.listenai/lisa/bin:$PATH | |
$HOME/.listenai/lisa/bin/node -e "console.log(require('os').platform())" | |
echo $PATH | |
lisa info zephyr | |
- name: Upload to oss | |
id: upload_to_oss | |
uses: listenai-jw/upload-to-oss@master | |
if: github.ref == 'refs/heads/master' | |
with: | |
key-id: ${{ secrets.OSS_KEY_ID }} | |
key-secret: ${{ secrets.OSS_KEY_SECRET }} | |
endpoint: https://oss-cn-shanghai.aliyuncs.com | |
bucket: iflyos-external | |
assets: | | |
csk-integration-bus-${{ matrix.dist_suffix }}${{ matrix.format }}:/public/cskTools/lisa-zephyr-${{ matrix.dist_suffix }}${{ matrix.format }} | |
- name: Upload to artifacts (for docker) | |
uses: actions/upload-artifact@v4 | |
if: matrix.dist_suffix == 'linux_x64-v2' | |
with: | |
name: csk-integration-bus-${{ matrix.dist_suffix }}${{ matrix.format }} | |
path: csk-integration-bus-${{ matrix.dist_suffix }}${{ matrix.format }} | |
publish-docker: | |
needs: test-bash | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: csk-integration-bus-linux_x64-v2.tar.xz | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
tags: listenai/csk6:latest,listenai/csk6:2.0.0-24091101 |