Skip to content

kata2

kata2 #37

Workflow file for this run

name: kata2
on:
push:
branches: [ kata2 ]
workflow_dispatch:
permissions: # added using https://github.com/step-security/secure-workflows
contents: write
env:
GO111MODULE: on
PROJECT: kata-containers
BRANCH: stable-2.5
ARM64: "on"
AMD64: "on"
# MLNX_X64_URL: https://content.mellanox.com/ofed/MLNX_OFED-5.8-4.1.5.0/MLNX_OFED_LINUX-5.8-4.1.5.0-ubuntu22.04-x86_64.tgz
# NVIDIA_X64_URL: https://us.download.nvidia.com/tesla/515.48.07/NVIDIA-Linux-x86_64-515.48.07.run
MLNX_X64_URL: ${{ secrets.MLNX_X64_URL }}
NVIDIA_X64_URL: ${{ secrets.NVIDIA_X64_URL }}
jobs:
karm64:
name: Build arm64 kernel and image
runs-on: [self-hosted, linux, arm64]
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.77.2
override: true
- name: Set up Go 1.22
uses: actions/setup-go@v4
with:
go-version: 1.22
- name: Check out repo code
uses: actions/checkout@v4
- name: Check out build code
uses: actions/checkout@v4
with:
repository: easystack/kata-containers
ref: ${{ env.BRANCH }}
token: ${{ secrets.KPULL }}
path: ${{ env.PROJECT }}
- name: Build image and kernel
run: |
cd ${{ env.PROJECT }}
make -f ../kata-image/kata-image.mk agent
TARGET=ecr make -f ../kata-image/kata-image.mk target
TARGET=kunlun make -f ../kata-image/kata-image.mk target
- name: Upload
shell: bash
run: |
cd kata-image
ls -lht
kamd64:
name: Build x64 kernel and image
runs-on: [self-hosted, linux, x64] # ubuntu-22.04
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.77.2
override: true
- name: Set up Go 1.22
uses: actions/setup-go@v4
with:
go-version: 1.22
- name: Check out repo code
uses: actions/checkout@v4
- name: Check out build code
uses: actions/checkout@v4
with:
repository: easystack/kata-containers
ref: ${{ env.BRANCH }}
token: ${{ secrets.KPULL }}
path: ${{ env.PROJECT }}
- name: Build image and kernel
run: |
cd ${{ env.PROJECT }}
make -f ../kata-image/kata-image.mk agent
TARGET=ecr make -f ../kata-image/kata-image.mk target
TARGET=nvidia make -f ../kata-image/kata-image.mk target
TARGET=mellanox make -f ../kata-image/kata-image.mk target
- name: Upload
run: |
cd kata-image
# image too big to upload ghcr
ls -lht
notify:
name: notify
runs-on: ubuntu-22.04
timeout-minutes: 5
needs: [ karm64, kamd64 ]
steps:
- name: WeChat Work notification
shell: bash
env:
AMD64: ${{ needs.kamd64.outputs.image }}
ARM64: ${{ needs.karm64.outputs.image }}
WEBHOOK: ${{ secrets.WEWORK_ECRGROUP_BUILD }}
run: |
text="ecr_kernel_image 编译完成."
if [[ "$AMD64" != "" ]];then
echo "image: $AMD64"
fi
if [[ "$ARM64" != "" ]];then
#text="$text\nimage: $ARM64"
echo "image: $ARM64"
fi
echo "text: $text"
data="{\"msgtype\":\"text\",\"text\":{\"content\":\"$text\"}}"
#curl ${WEBHOOK} -H 'Content-Type: application/json' -d "$data"