diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml deleted file mode 100644 index 8f72dd3c9..000000000 --- a/.github/workflows/build-push.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: build-push -on: - push: - branches: - - main -env: - GO_VERSION: 1.19 - K8S_VERSION: 1.25.0 -permissions: - contents: read - packages: write - -jobs: - - image: - name: Build image - runs-on: ubuntu-20.04 - strategy: - matrix: - image: - - intel-fpga-admissionwebhook - - intel-fpga-initcontainer - - intel-gpu-initcontainer - - intel-gpu-plugin - - intel-fpga-plugin - - intel-qat-initcontainer - - intel-qat-plugin - - intel-qat-plugin-kerneldrv - - intel-vpu-plugin - - intel-deviceplugin-operator - - intel-sgx-admissionwebhook - - intel-sgx-plugin - - intel-sgx-initcontainer - - intel-dsa-plugin - - intel-iaa-plugin - - intel-idxd-config-initcontainer - - intel-dlb-plugin - - intel-dlb-initcontainer - - # Demo images - - crypto-perf - - accel-config-demo - - intel-opencl-icd - - iaa-qpl-demo - - opae-nlb-demo - - openssl-qat-engine - - sgx-sdk-demo - - sgx-aesmd-demo - - dlb-dpdk-demo - - dlb-libdlb-demo - builder: [buildah, docker] - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - uses: actions/setup-go@v3 - - run: make -e vendor - - run: | - echo "ref: ${{ github.ref }}" - echo "ref_name: ${{ github.ref_name }}" - - uses: docker/login-action@v2 - if: ${{ github.event_name == 'push' && github.ref_name == 'main' && matrix.builder == 'docker' }} - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build image - env: - IMAGE_NAME: ${{ matrix.image }} - BUILDER_NAME: ${{ matrix.builder }} - run: | - make ${IMAGE_NAME} BUILDER=${BUILDER_NAME} REG=ghcr.io/intel/ TAG=devel - if: ${{ github.event_name == 'push' && github.ref_name == 'main' && matrix.builder == 'docker' }} - - run: | - docker push ghcr.io/intel/${{ matrix.image }}:devel - if: ${{ github.event_name == 'push' && github.ref_name == 'main' && matrix.builder == 'docker' }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 9b6da970d..000000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,180 +0,0 @@ -name: CI -on: - push: - branches: - - main - - 'release-*' - pull_request: - branches: - - main - - 'release-*' -env: - GO_VERSION: 1.19 - K8S_VERSION: 1.25.0 -permissions: - contents: read - -jobs: - - docs: - name: Check docs are buildable - runs-on: ubuntu-latest - steps: - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y python3-venv - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Set up doc directory - run: | - mkdir $HOME/output - touch $HOME/output/.nojekyll - - name: Build latest - run: | - GITHUB_SHA=$(git rev-parse HEAD) - export GITHUB_SHA - rm -rf _work/venv - make vhtml - mv _build/html/* $HOME/output/ - - golangci: - permissions: - contents: read # for actions/checkout to fetch code - pull-requests: read # for golangci/golangci-lint-action to fetch pull requests - name: lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: ${{ env.GO_VERSION }} - check-latest: true - - name: Install build dependencies needed for VPU plugin - run: | - sudo apt-get update - sudo apt-get -y install libusb-1.0-0-dev - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - version: v1.50.0 - args: -v --timeout 5m - - build: - name: Build and check device plugins - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: ${{ env.GO_VERSION }} - check-latest: true - - uses: actions/cache@v3 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - name: Check Dockerfiles - run: make check-dockerfiles - - name: Install build dependencies needed for VPU plugin - run: | - sudo apt-get update - sudo apt-get -y install libusb-1.0-0-dev - - run: make go-mod-tidy - - run: make BUILDTAGS=kerneldrv - - run: make test BUILDTAGS=kerneldrv - - name: Install envtest tool and run envtest - run: | - go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest - setup-envtest use ${K8S_VERSION} - - run: | - KUBEBUILDER_ASSETS=$(setup-envtest use -i -p path ${K8S_VERSION}) make envtest - - run: make check-github-actions - - name: Codecov report - run: bash <(curl -s https://codecov.io/bash) - - image: - name: Build image - runs-on: ubuntu-20.04 - strategy: - matrix: - image: - - intel-fpga-admissionwebhook - - intel-fpga-initcontainer - - intel-gpu-initcontainer - - intel-gpu-plugin - - intel-fpga-plugin - - intel-qat-initcontainer - - intel-qat-plugin - - intel-qat-plugin-kerneldrv - - intel-vpu-plugin - - intel-deviceplugin-operator - - intel-sgx-admissionwebhook - - intel-sgx-plugin - - intel-sgx-initcontainer - - intel-dsa-plugin - - intel-iaa-plugin - - intel-idxd-config-initcontainer - - intel-dlb-plugin - - intel-dlb-initcontainer - - # Demo images - - crypto-perf - - accel-config-demo - - intel-opencl-icd - - iaa-qpl-demo - - opae-nlb-demo - - openssl-qat-engine - - sgx-sdk-demo - - sgx-aesmd-demo - - dlb-dpdk-demo - - dlb-libdlb-demo - builder: [buildah, docker] - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: | - ~/.cache/go-build - ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- - - uses: actions/setup-go@v3 - - run: make -e vendor - - name: Build image - env: - IMAGE_NAME: ${{ matrix.image }} - BUILDER_NAME: ${{ matrix.builder }} - run: | - make ${IMAGE_NAME} BUILDER=${BUILDER_NAME} - - kind-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: ${{ env.GO_VERSION }} - check-latest: true - - name: Test SGX & FPGA Admission Webhook, Deploy Operator - run: | - make test-with-kind - - terrascan: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Install terrascan - run: | - curl -sL "$(curl -sL https://api.github.com/repos/tenable/terrascan/releases/latest | grep -o -E "https://.+?_Linux_x86_64.tar.gz")" > terrascan.tar.gz - tar -xf terrascan.tar.gz terrascan && rm terrascan.tar.gz - install terrascan /usr/local/bin && rm terrascan - - name: Run Terrascan - run: make terrascan - diff --git a/.github/workflows/e2e-dlb.yml b/.github/workflows/e2e-dlb.yml index 67e619f61..7c18fb279 100644 --- a/.github/workflows/e2e-dlb.yml +++ b/.github/workflows/e2e-dlb.yml @@ -19,6 +19,69 @@ permissions: contents: read jobs: + image: + name: Build image + runs-on: ubuntu-20.04 + strategy: + matrix: + image: + - intel-dlb-plugin + - intel-dlb-initcontainer + - dlb-libdlb-demo + builder: [docker] + steps: + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - uses: actions/setup-go@v3 + - run: make -e vendor + - name: Build image + env: + IMAGE_NAME: ${{ matrix.image }} + BUILDER_NAME: ${{ matrix.builder }} + run: | + make ${IMAGE_NAME} BUILDER=${BUILDER_NAME} + mkdir -p artifacts-${{ github.sha }} + docker tag intel/${IMAGE_NAME}:devel intel/${IMAGE_NAME}:${{ github.sha }} + docker save intel/${IMAGE_NAME}:devel > artifacts-${{ github.sha }}/${IMAGE_NAME}.tar + + - name: Temporarily save Docker image + uses: actions/upload-artifact@v3 + with: + name: artifacts-${{ github.sha }} + path: artifacts-${{ github.sha }} + retention-days: 1 + + transfer-images: + name: transfer-images + runs-on: self-hosted +# runs-on: simics-gnr + needs: image + steps: + - name: Wait for ready state + run: ../../../../bmetal/actions-bmetal-runstage.sh waitready + - name: Describe environment + run: | + env |sort + date + - name: Retrieve saved artifacts + uses: actions/download-artifact@v3 + with: + name: artifacts-${{ github.sha }} + path: artifacts-${{ github.sha }} + - name: Show the artifacts + run: | + date + ls -la artifacts-${{ github.sha }} + - name: Push images to local registry + run: ../../../../bmetal/actions-bmetal-runstage.sh push + e2e-dlb: name: e2e-dlb strategy: @@ -26,6 +89,7 @@ jobs: matrix: runner: [simics-spr, simics-gnr] runs-on: ${{ matrix.runner }} + needs: transfer-images steps: - uses: actions/checkout@v3 with: @@ -37,9 +101,10 @@ jobs: echo "Ref: ${{ github.ref }}" echo "SHA: ${{ github.sha }}" echo "Images: $IMAGES" + - name: Wait for ready state run: ../../../../bmetal/actions-bmetal-runstage.sh waitready - name: Prepare test environment - run: ../../../../bmetal/actions-bmetal-runstage.sh prepare + run: ../../../../bmetal/actions-bmetal-runstage.sh prepare2 - name: Run tests - run: ../../../../bmetal/actions-bmetal-runstage.sh test + run: ../../../../bmetal/actions-bmetal-runstage.sh test2 diff --git a/.github/workflows/e2e-dsa.yml b/.github/workflows/e2e-dsa.yml deleted file mode 100644 index 09eae5032..000000000 --- a/.github/workflows/e2e-dsa.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: e2e-dsa -on: - workflow_dispatch: - schedule: - - cron: '0 4 * * *' - pull_request: - branches: - - main - - 'release-*' - push: - branches: - - main - - 'release-*' - -env: - IMAGES: 'intel-dsa-plugin intel-idxd-config-initcontainer accel-config-demo' - -permissions: - contents: read - -jobs: - e2e-dsa: - name: e2e-dsa - strategy: - fail-fast: false - matrix: - runner: [simics-spr, simics-gnr] - runs-on: ${{ matrix.runner }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Describe test environment - run: | - echo "Event name: ${{ github.event_name }}" - echo "Actor: ${{ github.actor }}" - echo "Ref: ${{ github.ref }}" - echo "SHA: ${{ github.sha }}" - echo "Images: $IMAGES" - - name: Wait for ready state - run: ../../../../bmetal/actions-bmetal-runstage.sh waitready - - name: Prepare test environment - run: ../../../../bmetal/actions-bmetal-runstage.sh prepare - - name: Run tests - run: ../../../../bmetal/actions-bmetal-runstage.sh test diff --git a/.github/workflows/e2e-fpga.yml b/.github/workflows/e2e-fpga.yml deleted file mode 100644 index cd4f28bee..000000000 --- a/.github/workflows/e2e-fpga.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: e2e-fpga -on: - workflow_dispatch: - schedule: - - cron: '0 4 * * *' - pull_request: - branches: - - main - - 'release-*' - push: - branches: - - main - - 'release-*' - -env: - IMAGES: 'intel-fpga-plugin intel-fpga-initcontainer intel-fpga-admissionwebhook opae-nlb-demo' - -permissions: - contents: read - -jobs: - e2e-fpga: - name: e2e-fpga - runs-on: [self-hosted, linux, x64, fpga] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Describe test environment - run: | - echo "Event name: ${{ github.event_name }}" - echo "Actor: ${{ github.actor }}" - echo "Ref: ${{ github.ref }}" - echo "SHA: ${{ github.sha }}" - echo "Images: $IMAGES" - - name: Wait for ready state - run: ../../../../bmetal/actions-bmetal-runstage.sh waitready - - name: Prepare test environment - run: ../../../../bmetal/actions-bmetal-runstage.sh prepare - - name: Run tests - run: ../../../../bmetal/actions-bmetal-runstage.sh test diff --git a/.github/workflows/e2e-gpu.yml b/.github/workflows/e2e-gpu.yml deleted file mode 100644 index 03feacb26..000000000 --- a/.github/workflows/e2e-gpu.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: e2e-gpu -on: - workflow_dispatch: - schedule: - - cron: '0 4 * * *' - pull_request: - branches: - - main - - 'release-*' - push: - branches: - - main - - 'release-*' - -env: - IMAGES: 'intel-gpu-plugin intel-gpu-initcontainer' - -permissions: - contents: read - -jobs: - e2e-gpu: - name: e2e-gpu - runs-on: [self-hosted, linux, x64, gpu] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Describe test environment - run: | - echo "Event name: ${{ github.event_name }}" - echo "Actor: ${{ github.actor }}" - echo "Ref: ${{ github.ref }}" - echo "SHA: ${{ github.sha }}" - echo "Images: $IMAGES" - - name: Wait for ready state - run: ../../../../bmetal/actions-bmetal-runstage.sh waitready - - name: Prepare test environment - run: ../../../../bmetal/actions-bmetal-runstage.sh prepare - - name: Run tests - run: ../../../../bmetal/actions-bmetal-runstage.sh test diff --git a/.github/workflows/e2e-iaa.yml b/.github/workflows/e2e-iaa.yml deleted file mode 100644 index 01efd319e..000000000 --- a/.github/workflows/e2e-iaa.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: e2e-iaa -on: - workflow_dispatch: - schedule: - - cron: '0 4 * * *' - pull_request: - branches: - - main - - 'release-*' - push: - branches: - - main - - 'release-*' - -env: - IMAGES: 'intel-iaa-plugin intel-idxd-config-initcontainer accel-config-demo' - -permissions: - contents: read - -jobs: - e2e-iaa: - name: e2e-iaa - strategy: - fail-fast: false - matrix: - runner: [simics-spr, simics-gnr] - runs-on: ${{ matrix.runner }} - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Describe test environment - run: | - echo "Event name: ${{ github.event_name }}" - echo "Actor: ${{ github.actor }}" - echo "Ref: ${{ github.ref }}" - echo "SHA: ${{ github.sha }}" - echo "Images: $IMAGES" - - name: Wait for ready state - run: ../../../../bmetal/actions-bmetal-runstage.sh waitready - - name: Prepare test environment - run: ../../../../bmetal/actions-bmetal-runstage.sh prepare - - name: Run tests - run: ../../../../bmetal/actions-bmetal-runstage.sh test diff --git a/.github/workflows/e2e-qat.yml b/.github/workflows/e2e-qat.yml deleted file mode 100644 index 993eed5cf..000000000 --- a/.github/workflows/e2e-qat.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: e2e-qat -on: - workflow_dispatch: - schedule: - - cron: '0 4 * * *' - pull_request: - branches: - - main - - 'release-*' - push: - branches: - - main - - 'release-*' - -env: - IMAGES: 'intel-qat-plugin intel-qat-initcontainer crypto-perf' - -permissions: - contents: read - -jobs: - e2e-qat: - name: e2e-qat - #if: contains('["bart0sh"]', github.actor) - runs-on: [self-hosted, linux, x64, qat] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Describe test environment - run: | - echo "Event name: ${{ github.event_name }}" - echo "Actor: ${{ github.actor }}" - echo "Ref: ${{ github.ref }}" - echo "SHA: ${{ github.sha }}" - echo "Images: $IMAGES" - - name: Wait for ready state - run: ../../../../bmetal/actions-bmetal-runstage.sh waitready - - name: Prepare test environment - run: ../../../../bmetal/actions-bmetal-runstage.sh prepare - - name: Run tests - run: ../../../../bmetal/actions-bmetal-runstage.sh test diff --git a/.github/workflows/e2e-qat4.yml b/.github/workflows/e2e-qat4.yml deleted file mode 100644 index db2c59512..000000000 --- a/.github/workflows/e2e-qat4.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: e2e-qat4 -on: - workflow_dispatch: - schedule: - - cron: '0 4 * * *' - pull_request: - branches: - - main - - 'release-*' - push: - branches: - - main - - 'release-*' - -env: - IMAGES: 'intel-qat-plugin intel-qat-initcontainer openssl-qat-engine' - -permissions: - contents: read - -jobs: - e2e-qat4: - name: e2e-qat4 - runs-on: [simics-spr] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Describe test environment - run: | - echo "Event name: ${{ github.event_name }}" - echo "Actor: ${{ github.actor }}" - echo "Ref: ${{ github.ref }}" - echo "SHA: ${{ github.sha }}" - echo "Images: $IMAGES" - - name: Wait for ready state - run: ../../../../bmetal/actions-bmetal-runstage.sh waitready - - name: Prepare test environment - run: ../../../../bmetal/actions-bmetal-runstage.sh prepare - - name: Run tests - run: ../../../../bmetal/actions-bmetal-runstage.sh test diff --git a/.github/workflows/e2e-sgx.yml b/.github/workflows/e2e-sgx.yml deleted file mode 100644 index b0e2c2d25..000000000 --- a/.github/workflows/e2e-sgx.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: e2e-sgx -on: - workflow_dispatch: - schedule: - - cron: '0 4 * * *' - pull_request: - branches: - - main - - 'release-*' - push: - branches: - - main - - 'release-*' - -env: - IMAGES: 'intel-sgx-plugin intel-sgx-initcontainer intel-sgx-admissionwebhook' - -permissions: - contents: read - -jobs: - e2e-sgx: - name: e2e-sgx - runs-on: [self-hosted, linux, x64, sgx] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Describe test environment - run: | - echo "Event name: ${{ github.event_name }}" - echo "Actor: ${{ github.actor }}" - echo "Ref: ${{ github.ref }}" - echo "SHA: ${{ github.sha }}" - echo "Images: $IMAGES" - - name: Wait for ready state - run: ../../../../bmetal/actions-bmetal-runstage.sh waitready - - name: Prepare test environment - run: ../../../../bmetal/actions-bmetal-runstage.sh prepare - - name: Run tests - run: ../../../../bmetal/actions-bmetal-runstage.sh test diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 38776167d..000000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: Publish - -on: - push: - branches: - - main - - release-0.23 - - release-0.24 - - release-0.25 - -permissions: - contents: read - -jobs: - build: - - permissions: - contents: write # for Git to git push - runs-on: ubuntu-latest - - steps: - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y python3-venv git - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: main - - name: Set up doc directory - run: | - mkdir $HOME/output - touch $HOME/output/.nojekyll - - name: Set up git - run: | - author=$(git log --merges --pretty=format:%an -n 1) - email=$(git log --merges --pretty=format:%ae -n 1) - git config --global user.name "$author" - git config --global user.email "$email" - - name: Build latest - run: | - GITHUB_SHA=$(git rev-parse HEAD) - export GITHUB_SHA - rm -rf _work/venv - make vhtml - mv _build/html/* $HOME/output/ - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: release-0.23 - - name: Build release-0.23 - run: | - GITHUB_SHA=$(git rev-parse HEAD) - export GITHUB_SHA - rm -rf _work/venv - make vhtml - mv _build/html $HOME/output/0.23 - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: release-0.24 - - name: Build release-0.24 - run: | - GITHUB_SHA=$(git rev-parse HEAD) - export GITHUB_SHA - rm -rf _work/venv - make vhtml - mv _build/html $HOME/output/0.24 - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - ref: release-0.25 - - name: Build release-0.25 - run: | - GITHUB_SHA=$(git rev-parse HEAD) - export GITHUB_SHA - rm -rf _work/venv - make vhtml - mv _build/html $HOME/output/0.25 - - name: Deploy the docs - shell: bash - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - cd $HOME/output - git init - git add . - git commit -m "latest html output" - git push -f https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:gh-pages