Staging Build #233
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2024 RapidStream Design Automation, Inc. and contributors. | |
# All rights reserved. The contributor(s) of this file has/have agreed to the | |
# RapidStream Contributor License Agreement. | |
name: Staging Build | |
concurrency: | |
group: release | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "*" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
name: Staging Build | |
runs-on: self-hosted | |
steps: | |
- name: Checkout myself | |
uses: actions/checkout@v4 | |
- name: Run Bazel to build | |
uses: ./.github/actions/build-release | |
env: | |
UBUNTU_PRO_TOKEN: ${{ secrets.UBUNTU_PRO_TOKEN }} | |
MAC_ADDRESS: ${{ secrets.MAC_ADDRESS }} | |
- name: Upload artifacts | |
# @v3 is kept for compatibility with the nektosact | |
# Should be upgraded to @v4 when the nektosact is updated | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tapa | |
path: ${{ github.workspace }}/artifacts.out/tapa.tar.gz | |
retention-days: 7 | |
test-staging: | |
name: Test Staging Build | |
runs-on: self-hosted | |
needs: build | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
# Test all Vitis versions on the latest supported Ubuntu LTS. | |
# - os: ubuntu-24 | |
# xilinx_version: "2024.1" | |
# Ubuntu 24.04 is not supported by Xilinx yet for the same reason | |
# as Fedora 39+. Glibc has different identifier names than the | |
# ones Xilinx expects. | |
- os: ubuntu-22 | |
xilinx_version: "2024.2" | |
- os: ubuntu-22 | |
xilinx_version: "2024.1" | |
- os: ubuntu-22 | |
xilinx_version: "2023.2" | |
- os: ubuntu-22 | |
xilinx_version: "2023.1" | |
- os: ubuntu-22 | |
xilinx_version: "2022.2" | |
- os: ubuntu-22 | |
xilinx_version: "2022.1" | |
# Test all OS versions with the latest Vitis version. | |
- os: ubuntu-20 | |
xilinx_version: "2024.2" | |
- os: ubuntu-18 | |
xilinx_version: "2024.2" | |
- os: debian-10 | |
xilinx_version: "2024.2" | |
- os: debian-11 | |
xilinx_version: "2024.2" | |
- os: almalinux-9 | |
xilinx_version: "2024.2" | |
- os: rockylinux-9 | |
xilinx_version: "2024.2" | |
- os: fedora-38 | |
xilinx_version: "2024.2" | |
- os: fedora-37 | |
xilinx_version: "2024.2" | |
- os: fedora-36 | |
xilinx_version: "2024.2" | |
- os: fedora-35 | |
xilinx_version: "2024.2" | |
- os: fedora-34 | |
xilinx_version: "2024.2" | |
- os: amazonlinux-2023 | |
xilinx_version: "2024.2" | |
steps: | |
- name: Checkout myself | |
uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: tapa | |
- name: Run tests with the downloaded artifact | |
uses: ./.github/actions/run-command | |
with: | |
run: | | |
RAPIDSTREAM_LOCAL_PACKAGE=/workspace/tapa.tar.gz ./install.sh -q | |
export RAPIDSTREAM_TAPA_HOME=~/.rapidstream-tapa | |
export PATH=~/.rapidstream-tapa/usr/bin:$PATH | |
export TAPA_CONCURRENCY=1 | |
source /opt/tools/xilinx/Vitis/${{ matrix.xilinx_version }}/settings64.sh | |
bats -j $(nproc) tests/testsuite_self_test.bats | |
find tests -name '*.bats' -print0 | xargs -0 bats -j $(nproc) | |
imageTag: rapidstream/tapa-testenv:${{ matrix.os }} | |
dockerfile: ./.github/docker/test-env/Dockerfile.${{ matrix.os }} | |
context: ./.github/docker/test-env | |
create-staging-release: | |
name: Create Staging Release | |
runs-on: self-hosted | |
needs: test-staging | |
if: "!github.event.act && startsWith(github.event.ref, 'refs/tags')" | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: tapa | |
- name: Create release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
artifacts: ${{ github.workspace }}/tapa.tar.gz | |
body: | | |
This is a staging build for ${{ github.sha }}. | |
commit: ${{ github.sha }} | |
name: Staging Build ${{ github.sha }} | |
generateReleaseNotes: true | |
prerelease: true |