ci: build debug sdk

This commit is contained in:
fengzero
2022-07-18 06:09:52 +00:00
parent 5a676fc344
commit 75437d8392
+90 -4
View File
@@ -29,6 +29,10 @@ jobs:
run: |
./install.sh -d ${{ matrix.arch[4] }} -c ${{ matrix.arch[0] }} -a ${{ matrix.arch[1] }}
- name: get version
id: get_version
run: echo "::set-output name=version::$(cat version)"
- name: compile
run: |
mkdir -p build && cd build
@@ -36,10 +40,6 @@ jobs:
-DCMAKE_BUILD_TYPE=Release -DDISABLE_UT=ON
make -j4
- name: get version
id: get_version
run: echo "::set-output name=version::$(cat version)"
- name: Create neuron sdk package
run: |
./package-sdk.sh -p ${{ matrix.arch[5] }} -n neuron-sdk-${{ steps.get_version.outputs.version }}
@@ -50,6 +50,46 @@ jobs:
path: |
neuron-sdk-*.tar.gz
build-debug-sdk:
runs-on: ubuntu-20.04
strategy:
matrix:
arch:
- [x86_64-linux-gnu, x86_64, gcc, g++, /usr/local, amd64]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: install
run: sudo apt-get update && sudo apt-get install -y ${{ matrix.arch[2] }} ${{ matrix.arch[3] }} pkg-config alien
- name: install dep
run: |
./install.sh -d ${{ matrix.arch[4] }} -c ${{ matrix.arch[0] }} -a ${{ matrix.arch[1] }}
- name: get version
id: get_version
run: echo "::set-output name=version::$(cat version)"
- name: compile
run: |
mkdir -p build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/${{ matrix.arch[0] }}.cmake \
-DDISABLE_UT=ON
make -j4
- name: Create neuron sdk package
run: |
./package-sdk.sh -p ${{ matrix.arch[5] }} -n neuron-sdk-debug-${{ steps.get_version.outputs.version }}
- uses: actions/upload-artifact@v3
with:
name: neuron-sdk-debug-${{ matrix.arch[5] }}
path: |
neuron-sdk-debug-*.tar.gz
create_daily_release:
runs-on: ubuntu-20.04
if: github.event_name == 'push'
@@ -130,6 +170,52 @@ jobs:
asset_name: ${{ matrix.type }}-${{ steps.get_version.outputs.version }}-daily-linux-${{ matrix.arch }}.${{ matrix.package }}
asset_content_type: application/octet-stream
upload_daily_release_debug-asset:
runs-on: ubuntu-20.04
if: github.event_name == 'push'
needs: create_daily_release
strategy:
matrix:
arch: [amd64]
type: [neuron-sdk-debug]
package: [tar.gz]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: get version
id: get_version
run: echo "::set-output name=version::$(cat version)"
- uses: actions/download-artifact@v2
with:
name: release_url
- id: release_url
run: |
value=`cat release_url.txt`
echo "::set-output name=name::$value"
- uses: actions/download-artifact@v2
with:
name: ${{ matrix.type }}-${{ matrix.arch }}
- id: package
run: echo "::set-output name=name::${{ matrix.type }}-${{ steps.get_version.outputs.version }}-${{ matrix.arch }}.${{ matrix.package }}"
- name: upload daily release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release_url.outputs.name }}
asset_path: ./${{ steps.package.outputs.name }}
asset_name: ${{ matrix.type }}-${{ steps.get_version.outputs.version }}-daily-linux-${{ matrix.arch }}.${{ matrix.package }}
asset_content_type: application/octet-stream
clean:
runs-on: ubuntu-20.04
needs: upload_daily_release_asset