diff --git a/.github/workflows/kuiper2_0-build.yml b/.github/workflows/kuiper2_0-build.yml new file mode 100644 index 0000000000..f88b8c8872 --- /dev/null +++ b/.github/workflows/kuiper2_0-build.yml @@ -0,0 +1,45 @@ +name: Kuiper2.0 +on: + push: + branches: + - staging/kuiper2.0 + pull_request: + branches: + - staging/kuiper2.0 + +jobs: + Build: + runs-on: ubuntu-latest + strategy: + matrix: + arch: [32, 64] + build_type: [basic, full] + exclude: + - build_type: ${{ github.event_name == 'pull_request' && 'full' }} + fail-fast: false + steps: + - uses: actions/checkout@v3 + - name: Set env variabiles + run: | + if [ "${{ github.event_name }}" == "pull_request" ]; then + BRANCH=$GITHUB_BASE_REF + else + BRANCH=$GITHUB_REF_NAME + fi + branch_name=$(echo $BRANCH | tr 'a-z' 'A-Z' | sed 's/[^[:alnum:]]/_/g') + type=$( echo ${{ matrix.build_type }} | tr 'a-z' 'A-Z') + echo ARTIFACT_NAME=kuiper_"${{ matrix.build_type }}"_"${{ matrix.arch }}" >> $GITHUB_ENV + echo BRANCH_NAME="$branch_name"_"$type"_"${{ matrix.arch }}" >> $GITHUB_ENV + - name: Build image + run: | + sudo apt-get update + sudo apt-get install -y qemu-user-static + ci/modify_config.sh ./config "${{ vars[format('{0}', env.BRANCH_NAME )] }}" + sudo bash build-docker.sh + ls kuiper-volume/*.zip >/dev/null 2>&1 && exit 0 || exit 2 + - name: Upload image + if: always() + uses: actions/upload-artifact@v4 + with: + name: ${{ env.ARTIFACT_NAME }} + path: ${{ github.workspace }}/kuiper-volume diff --git a/README.md b/README.md index 8af2e89205..4a07cc474f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # kuiper-gen -[![Build Status](https://dev.azure.com/AnalogDevices/OpenSource/_apis/build/status%2Fanalogdevicesinc.adi-kuiper-gen?branchName=staging%2Fkuiper2.0)](https://dev.azure.com/AnalogDevices/OpenSource/_build/latest?definitionId=53&branchName=staging%2Fkuiper2.0) +[![Kuiper2.0](https://github.com/analogdevicesinc/adi-kuiper-gen/actions/workflows/kuiper2_0-build.yml/badge.svg?branch=staging%2Fkuiper2.0)](https://github.com/analogdevicesinc/adi-kuiper-gen/actions/workflows/kuiper2_0-build.yml) Tool used to create Debian OS images.