Skip to content

Upgrade to kraken-build==0.32.4 #406

Upgrade to kraken-build==0.32.4

Upgrade to kraken-build==0.32.4 #406

Workflow file for this run

name: Docker image
on:
push: { branches: [ develop ], tags: [ "*" ], paths: [ ".kraken.*", "Dockerfile", ".github/workflows/*.yml", "src/*", "formulae/*" ] }
pull_request: { branches: [ develop ] }
env:
COLUMNS: 160
jobs:
test-formulae:
runs-on: [ "self-hosted", "os:linux", "arch:${{ matrix.platform }}" ]
strategy:
fail-fast: false
matrix:
platform: [ "arm64", "amd64" ]
steps:
- name: Test Formulae
run: |
status_code=0
for formula in $(ls formulae/*.py); do
echo " :::: TEST FORMULA $formula"
if ! python3 src/main.py $formula -o install_to=bin; then
status_code=1
fi
done
exit $status_code
build:
runs-on: [ "self-hosted", "os:linux", "arch:${{ matrix.platform }}" ]
needs: [ test-formulae ]
strategy:
fail-fast: false
matrix:
platform: [ "arm64", "amd64" ]
base_image: [ "ubuntu_22.04", "ubuntu_20.04" ]
steps:
# NOTE (@NiklasRosenstein): Need Git 2.18 available on the runner for the checkout action to use it; otherwise
# it falls back to the REST API and Git operations afterwards will fail because no repository is present.
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v2
if: "${{ matrix.platform == 'amd64' }}"
with:
python-version: "3.10.6"
- name: Create Python 3 virtualenv (arm64)
if: "${{ matrix.platform == 'arm64' }}"
run: python3.10 -m venv .venv
- name: Activate Python 3 virtualenv (arm64)
if: "${{ matrix.platform == 'arm64' }}"
run: source .venv/bin/activate && env >> $GITHUB_ENV
- name: Install kraken-wrapper
run: pip install --upgrade kraken-wrapper
- name: Debug
run: pwd; ls -la
- run: |
krakenw r -s -v
krakenw q d --resume :docker-kraken-image/${{ matrix.base_image }}/linux/${{ matrix.platform }} -v
krakenw r --resume :docker-kraken-image/${{ matrix.base_image }}/linux/${{ matrix.platform }} -v --state-name "${{ matrix.base_image }}-${{ matrix.platform }}"
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
with:
name: kraken-build-state
path: build/.kraken/buildenv/state*.dill
manifest-tool:
runs-on: ubuntu-latest
needs: [ "build" ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v3
with:
name: kraken-build-state
path: build/.kraken/buildenv/
- run: ls -la build/.kraken/buildenv/
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install kraken-wrapper
run: pip install kraken-wrapper
- name: Install manifest-tool
run: |
wget -q https://github.com/estesp/manifest-tool/releases/download/v2.0.5/binaries-manifest-tool-2.0.5.tar.gz
tar xvf binaries-manifest-tool-2.0.5.tar.gz manifest-tool-linux-amd64
mv manifest-tool-linux-amd64 /usr/local/bin/manifest-tool
- run: |
krakenw q tree -v --all --resume :docker-kraken-image-multiarch
krakenw r --resume :docker-kraken-image-multiarch -v
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }}