Allow users to optionally use the GitHub CI. --- .github/workflows/toolchain.yml | 196 ++++++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 .github/workflows/toolchain.yml
diff --git a/.github/workflows/toolchain.yml b/.github/workflows/toolchain.yml new file mode 100644 index 0000000..f9fec95 --- /dev/null +++ b/.github/workflows/toolchain.yml @@ -0,0 +1,196 @@ +name: Toolchain + +on: + # Triggers the workflow on push or pull request for the given branch + push: + branches: [ master ] + pull_request: + branches: [ master ] + + # Trigger manually from the Actions tab + workflow_dispatch: + +jobs: + devel: + strategy: + fail-fast: false + matrix: + tool: + - autotools-base + - autotools + - capstone + - dtc + - gnu-default-tools + - libtool + - libusb + - or1ksim + - qemu-couverture + - qemu-xilinx + - qemu + - sis + - spike + - swig + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + path: rsb + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install \ + build-essential \ + ninja-build \ + libudev-dev + - name: Build ${{ matrix.tool }} + run: | + cd rsb/rtems + ../source-builder/sb-set-builder \ + --log=l-${{ matrix.tool }} \ + --prefix=/opt/rtems/6 \ + --bset-tar-file \ + devel/${{ matrix.tool }} + - name: Archive log on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v3 + with: + name: log-${{ matrix.tool }} + path: | + rsb/rtems/l-${{ matrix.tool }} + rsb/**/rsb-report-*.txt + - name: Archive artifacts + uses: actions/upload-artifact@v3 + with: + name: devel-${{ matrix.tool }} + path: rsb/rtems/tar/*.tar* + + build: + strategy: + fail-fast: false + matrix: + target: + - aarch64 + - arm + - bfin + - i386 + - lm32 + - m68k + - microblaze + - mips + - moxie + - nios2 + - or1k + - powerpc + - riscv + - sh + - sparc + - sparc64 + - v850 + - x86_64 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + path: rsb + - uses: actions/checkout@v3 + with: + path: rtems + ref: ci + repository: RTEMS/rtems + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install \ + build-essential \ + flex \ + bison \ + cmake \ + texinfo \ + device-tree-compiler \ + u-boot-tools \ + lzop \ + libusb-1.0-0-dev \ + python3 \ + python-is-python3 \ + libpython3-dev \ + python3-dev + - name: Build toolchain + run: | + cd rsb/rtems + ../source-builder/sb-set-builder \ + --log=l-${{ matrix.target }} \ + --prefix=/opt/rtems/6 \ + --bset-tar-file \ + 6/rtems-${{ matrix.target }} + - name: Archive log on failure + if: ${{ failure() }} + uses: actions/upload-artifact@v3 + with: + name: log-${{ matrix.target }} + path: rsb/rtems/l-${{ matrix.target }} + - name: Archive artifacts + uses: actions/upload-artifact@v3 + with: + name: tools-${{ matrix.target }} + path: rsb/rtems/tar/*.tar* + #- name: Build BSPs + # uses: ./rtems/.github/actions/build-bsps + # with: + # target: ${{ matrix.target }} + # sources-rtems: "${GITHUB_WORKSPACE}/rtems" + # prefix: /opt/rtems/6 + + simulator: + # run even if not all of the earlier matrix builds worked + if: ${{ always() }} + needs: + - build + - devel + strategy: + fail-fast: false + matrix: + simulators: + - sparc/gr740 + - riscv/griscv + - arm/xilinx_zynq_a9_qemu + runs-on: ubuntu-latest + steps: + - name: split arch and BSP + shell: bash + run: | + arch=`echo "${{ matrix.simulators }}" | sed -e "s|/.*||g"` + bsp=`echo "${{ matrix.simulators }}" | sed -e "s|.*/||g"` + echo "arch=${arch}" >> $GITHUB_ENV + echo "bsp=${bsp}" >> $GITHUB_ENV + - uses: actions/checkout@v3 + with: + path: rtems + ref: ci + repository: RTEMS/rtems + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install \ + python3 \ + python-is-python3 \ + jq + - name: Download toolchain artifact + uses: actions/download-artifact@v3 + with: + name: tools-${{ env.arch }} + - name: Download qemu artifact + uses: actions/download-artifact@v3 + with: + name: devel-qemu + - name: Unpack toolchain + run: | + mkdir -p "$GITHUB_WORKSPACE/toolchain" + for t in *.tar.bz2; do tar xf $t -v -C "$GITHUB_WORKSPACE/toolchain"; done + ls -la "$GITHUB_WORKSPACE/toolchain" + - name: Start simulator run + id: simulator + uses: ./rtems/.github/actions/run-simulator + with: + target: ${{ matrix.simulators }} + sources-rtems: "$GITHUB_WORKSPACE/rtems" + prefix: "$GITHUB_WORKSPACE/toolchain/opt/rtems/6" -- 2.35.3 _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel