Skip to content

Commit

Permalink
Build Pi-to-Rio compiler with our Pi compiler (#44)
Browse files Browse the repository at this point in the history
This uses the Pi compiler built in the workflow to build the Pi-to-Rio compiler
(for both 32-bit and 64-bit cases).
  • Loading branch information
PeterJohnson authored Nov 21, 2022
1 parent 1e5b9ce commit 9af15f9
Show file tree
Hide file tree
Showing 5 changed files with 343 additions and 129 deletions.
302 changes: 210 additions & 92 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,88 @@ jobs:
with:
name: roborio-academic-cortexa9_vfpv3-sysroot
path: output/*

build-sysroot-bullseye-armhf:
name: Build sysroot for bullseye-armhf
runs-on: ubuntu-latest
container: "docker.io/wpilib/opensdk-ubuntu:22.04"
env:
WPI_TARGET: bullseye
WPI_TARGET_PORT: armhf
WPI_USE_THREADS: 8
steps:
- uses: actions/checkout@v3
- name: Install opensysroot
run: |
cd res/opensysroot
python3 -m pip install .
- name: Build sysroot
run: |
make backend
- uses: actions/upload-artifact@v3
with:
name: bullseye-armhf-sysroot
path: output/*

build-sysroot-bullseye-arm64:
name: Build sysroot for bullseye-arm64
runs-on: ubuntu-latest
container: "docker.io/wpilib/opensdk-ubuntu:22.04"
env:
WPI_TARGET: bullseye
WPI_TARGET_PORT: arm64
WPI_USE_THREADS: 8
steps:
- uses: actions/checkout@v3
- name: Install opensysroot
run: |
cd res/opensysroot
python3 -m pip install .
- name: Build sysroot
run: |
make backend
- uses: actions/upload-artifact@v3
with:
name: bullseye-arm64-sysroot
path: output/*

build-sysroot-raspi-bullseye-armhf:
name: Build sysroot for raspi-bullseye-armhf
runs-on: ubuntu-latest
container: "docker.io/wpilib/opensdk-ubuntu:22.04"
env:
WPI_TARGET: raspi-bullseye
WPI_TARGET_PORT: armhf
WPI_USE_THREADS: 8
steps:
- uses: actions/checkout@v3
- name: Install opensysroot
run: |
cd res/opensysroot
python3 -m pip install .
- name: Build sysroot
run: |
make backend
- uses: actions/upload-artifact@v3
with:
name: raspi-bullseye-armhf-sysroot
path: output/*


build-platform-utils-roborio-academic-cortexa9_vfpv3:
needs: build-sysroot-roborio-academic-cortexa9_vfpv3
strategy:
matrix:
host:
[

{
os-cfg: linux_x86_64,
runner: ubuntu-latest,
container: "docker.io/wpilib/opensdk-ubuntu:22.04",
testable: true,
},

{
os-cfg: windows_x86_64,
runner: ubuntu-latest,
Expand All @@ -63,18 +133,6 @@ jobs:
container: "",
testable: false,
},
{
os-cfg: linux_arm64,
runner: ubuntu-latest,
container: "docker.io/wpilib/opensdk-ubuntu:22.04",
testable: false,
},
{
os-cfg: linux_armhf,
runner: ubuntu-latest,
container: "docker.io/wpilib/opensdk-ubuntu:22.04",
testable: false,
},
]
name: Build roborio-academic-cortexa9_vfpv3 for ${{ matrix.host.os-cfg }}
runs-on: ${{ matrix.host.runner }}
Expand Down Expand Up @@ -118,42 +176,23 @@ jobs:
run: make sign
- uses: actions/upload-artifact@v3
with:
name: roborio-academic-cortexa9_vfpv3-${{matrix.host.os-cfg}}
name: roborio-academic-cortexa9_vfpv3-${{matrix.host.os-cfg }}
path: output/*

build-sysroot-bullseye-armhf:
name: Build sysroot for bullseye-armhf
runs-on: ubuntu-latest
container: "docker.io/wpilib/opensdk-ubuntu:22.04"
env:
WPI_TARGET: bullseye
WPI_TARGET_PORT: armhf
WPI_USE_THREADS: 8
steps:
- uses: actions/checkout@v3
- name: Install opensysroot
run: |
cd res/opensysroot
python3 -m pip install .
- name: Build sysroot
run: |
make backend
- uses: actions/upload-artifact@v3
with:
name: bullseye-armhf-sysroot
path: output/*
build-platform-utils-bullseye-armhf:
needs: build-sysroot-bullseye-armhf
strategy:
matrix:
host:
[

{
os-cfg: linux_x86_64,
runner: ubuntu-latest,
container: "docker.io/wpilib/opensdk-ubuntu:22.04",
testable: true,
},

{
os-cfg: windows_x86_64,
runner: ubuntu-latest,
Expand Down Expand Up @@ -215,42 +254,16 @@ jobs:
run: make sign
- uses: actions/upload-artifact@v3
with:
name: bullseye-armhf-${{matrix.host.os-cfg}}
name: bullseye-armhf-${{matrix.host.os-cfg }}
path: output/*

build-sysroot-bullseye-arm64:
name: Build sysroot for bullseye-arm64
runs-on: ubuntu-latest
container: "docker.io/wpilib/opensdk-ubuntu:22.04"
env:
WPI_TARGET: bullseye
WPI_TARGET_PORT: arm64
WPI_USE_THREADS: 8
steps:
- uses: actions/checkout@v3
- name: Install opensysroot
run: |
cd res/opensysroot
python3 -m pip install .
- name: Build sysroot
run: |
make backend
- uses: actions/upload-artifact@v3
with:
name: bullseye-arm64-sysroot
path: output/*
build-platform-utils-bullseye-arm64:
needs: build-sysroot-bullseye-arm64
strategy:
matrix:
host:
[
{
os-cfg: linux_x86_64,
runner: ubuntu-latest,
container: "docker.io/wpilib/opensdk-ubuntu:22.04",
testable: true,
},

{
os-cfg: windows_x86_64,
runner: ubuntu-latest,
Expand Down Expand Up @@ -312,42 +325,16 @@ jobs:
run: make sign
- uses: actions/upload-artifact@v3
with:
name: bullseye-arm64-${{matrix.host.os-cfg}}
name: bullseye-arm64-${{matrix.host.os-cfg }}
path: output/*

build-sysroot-raspi-bullseye-armhf:
name: Build sysroot for raspi-bullseye-armhf
runs-on: ubuntu-latest
container: "docker.io/wpilib/opensdk-ubuntu:22.04"
env:
WPI_TARGET: raspi-bullseye
WPI_TARGET_PORT: armhf
WPI_USE_THREADS: 8
steps:
- uses: actions/checkout@v3
- name: Install opensysroot
run: |
cd res/opensysroot
python3 -m pip install .
- name: Build sysroot
run: |
make backend
- uses: actions/upload-artifact@v3
with:
name: raspi-bullseye-armhf-sysroot
path: output/*
build-platform-utils-raspi-bullseye-armhf:
needs: build-sysroot-raspi-bullseye-armhf
strategy:
matrix:
host:
[
{
os-cfg: linux_x86_64,
runner: ubuntu-latest,
container: "docker.io/wpilib/opensdk-ubuntu:22.04",
testable: true,
},

{
os-cfg: windows_x86_64,
runner: ubuntu-latest,
Expand Down Expand Up @@ -415,11 +402,142 @@ jobs:
run: make sign
- uses: actions/upload-artifact@v3
with:
name: raspi-bullseye-armhf-${{matrix.host.os-cfg}}
name: raspi-bullseye-armhf-${{matrix.host.os-cfg }}
path: output/*


build-platform-utils-raspi-bullseye-armhf-linux-x86_64:
needs: [build-sysroot-raspi-bullseye-armhf]
name: Build raspi-bullseye-armhf for linux_x86_64
runs-on: ubuntu-latest
container: "docker.io/wpilib/opensdk-ubuntu:22.04"
env:
WPI_HOST: linux_x86_64
WPI_TARGET: raspi-bullseye
WPI_TARGET_PORT: armhf
WPI_USE_THREADS: 8
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: raspi-bullseye-armhf-sysroot
path: output/

- name: Build
run: |
make frontend
rm output/*.tar
- uses: actions/upload-artifact@v3
with:
name: raspi-bullseye-armhf-linux_x86_64
path: output/*

build-platform-utils-roborio-academic-cortexa9_vfpv3-raspi-bullseye-armhf:
needs: [build-sysroot-roborio-academic-cortexa9_vfpv3, build-platform-utils-raspi-bullseye-armhf-linux-x86_64]
name: Build roborio-academic-cortexa9_vfpv3 for raspi-bullseye_armhf
runs-on: ubuntu-latest
container: "docker.io/wpilib/opensdk-ubuntu:22.04"
env:
WPI_HOST: raspi-bullseye_armhf
WPI_TARGET: roborio-academic
WPI_TARGET_PORT: cortexa9_vfpv3
WPI_USE_THREADS: 8
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: roborio-academic-cortexa9_vfpv3-sysroot
path: output/

- uses: actions/download-artifact@v3
with:
name: raspi-bullseye-armhf-linux_x86_64
path: cross/
- name: Install cross-compiler
run: |
cd cross
find . -type f
tar xzf *.tgz
cd raspi-bullseye
rm -rf /usr/aarch64-linux-gnu /usr/arm-linux-gnueabihf
cp -Rp * /usr
- name: Build
run: |
make frontend
rm output/*.tar
- uses: actions/upload-artifact@v3
with:
name: roborio-academic-cortexa9_vfpv3-raspi-bullseye_armhf
path: output/*

build-platform-utils-bullseye-arm64-linux-x86_64:
needs: [build-sysroot-bullseye-arm64]
name: Build bullseye-arm64 for linux_x86_64
runs-on: ubuntu-latest
container: "docker.io/wpilib/opensdk-ubuntu:22.04"
env:
WPI_HOST: linux_x86_64
WPI_TARGET: bullseye
WPI_TARGET_PORT: arm64
WPI_USE_THREADS: 8
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: bullseye-arm64-sysroot
path: output/

- name: Build
run: |
make frontend
rm output/*.tar
- uses: actions/upload-artifact@v3
with:
name: bullseye-arm64-linux_x86_64
path: output/*

build-platform-utils-roborio-academic-cortexa9_vfpv3-bullseye-arm64:
needs: [build-sysroot-roborio-academic-cortexa9_vfpv3, build-platform-utils-bullseye-arm64-linux-x86_64]
name: Build roborio-academic-cortexa9_vfpv3 for bullseye_arm64
runs-on: ubuntu-latest
container: "docker.io/wpilib/opensdk-ubuntu:22.04"
env:
WPI_HOST: bullseye_arm64
WPI_TARGET: roborio-academic
WPI_TARGET_PORT: cortexa9_vfpv3
WPI_USE_THREADS: 8
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: roborio-academic-cortexa9_vfpv3-sysroot
path: output/

- uses: actions/download-artifact@v3
with:
name: bullseye-arm64-linux_x86_64
path: cross/
- name: Install cross-compiler
run: |
cd cross
find . -type f
tar xzf *.tgz
cd bullseye
rm -rf /usr/aarch64-linux-gnu /usr/arm-linux-gnueabihf
cp -Rp * /usr
- name: Build
run: |
make frontend
rm output/*.tar
- uses: actions/upload-artifact@v3
with:
name: roborio-academic-cortexa9_vfpv3-bullseye_arm64
path: output/*

release:
needs: [build-platform-utils-roborio-academic-cortexa9_vfpv3, build-platform-utils-bullseye-armhf, build-platform-utils-bullseye-arm64, build-platform-utils-raspi-bullseye-armhf]
needs: [build-platform-utils-roborio-academic-cortexa9_vfpv3, build-platform-utils-bullseye-armhf, build-platform-utils-bullseye-arm64, build-platform-utils-raspi-bullseye-armhf, build-platform-utils-raspi-bullseye-armhf-linux-x86_64, build-platform-utils-roborio-academic-cortexa9_vfpv3-raspi-bullseye-armhf, build-platform-utils-bullseye-arm64-linux-x86_64, build-platform-utils-roborio-academic-cortexa9_vfpv3-bullseye-arm64]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
Expand Down
Loading

0 comments on commit 9af15f9

Please sign in to comment.