Update for 2024 (#56) #364
Workflow file for this run
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
name: Build | |
on: | |
push: | |
paths-ignore: | |
- ".vscode" | |
- "**.md" | |
pull_request: | |
paths-ignore: | |
- ".vscode" | |
- "**.md" | |
jobs: | |
build-sysroot-roborio-academic-cortexa9_vfpv3: | |
name: Build sysroot for roborio-academic-cortexa9_vfpv3 | |
runs-on: ubuntu-latest | |
container: "docker.io/wpilib/opensdk-ubuntu:20.04" | |
env: | |
WPI_TARGET: roborio-academic | |
WPI_TARGET_PORT: cortexa9_vfpv3 | |
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: 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:20.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:20.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:20.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:20.04", | |
testable: true, | |
}, | |
{ | |
os-cfg: windows_x86_64, | |
runner: ubuntu-latest, | |
container: "docker.io/wpilib/opensdk-ubuntu:20.04", | |
testable: false, | |
}, | |
{ | |
os-cfg: macos_x86_64, | |
runner: macos-latest, | |
container: "", | |
testable: true, | |
}, | |
{ | |
os-cfg: macos_arm64, | |
runner: macos-latest, | |
container: "", | |
testable: false, | |
}, | |
] | |
name: Build roborio-academic-cortexa9_vfpv3 for ${{ matrix.host.os-cfg }} | |
runs-on: ${{ matrix.host.runner }} | |
container: ${{ matrix.host.container }} | |
env: | |
WPI_HOST: ${{matrix.host.os-cfg}} | |
WPI_TARGET: roborio-academic | |
WPI_TARGET_PORT: cortexa9_vfpv3 | |
WPI_USE_THREADS: 8 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prep MacOS | |
if: contains(matrix.host.runner, 'macos') | |
run: brew install rsync xz gmp mpfr libmpc isl | |
- uses: actions/download-artifact@v3 | |
with: | |
name: roborio-academic-cortexa9_vfpv3-sysroot | |
path: output/ | |
- name: Build | |
run: | | |
make frontend | |
rm output/*.tar | |
- name: Test | |
if: matrix.host.testable | |
run: make test | |
- name: Import Apple Developer ID Certificate | |
if: contains(matrix.host.os-cfg, 'macos') && | |
github.repository_owner == 'wpilibsuite' && | |
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) | |
uses: wpilibsuite/import-signing-certificate@v1 | |
with: | |
certificate-data: ${{ secrets.APPLE_CERTIFICATE_DATA }} | |
certificate-passphrase: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} | |
- name: Sign toolchain with Apple Developer ID Certificate | |
if: contains(matrix.host.os-cfg, 'macos') && | |
github.repository_owner == 'wpilibsuite' && | |
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) | |
env: | |
APPLE_DEVELOPER_ID: ${{ secrets.APPLE_DEVELOPER_ID }} | |
run: make sign | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: roborio-academic-cortexa9_vfpv3-${{matrix.host.os-cfg }} | |
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:20.04", | |
testable: true, | |
}, | |
{ | |
os-cfg: windows_x86_64, | |
runner: ubuntu-latest, | |
container: "docker.io/wpilib/opensdk-ubuntu:20.04", | |
testable: false, | |
}, | |
{ | |
os-cfg: macos_x86_64, | |
runner: macos-latest, | |
container: "", | |
testable: true, | |
}, | |
{ | |
os-cfg: macos_arm64, | |
runner: macos-latest, | |
container: "", | |
testable: false, | |
}, | |
] | |
name: Build bullseye-armhf for ${{ matrix.host.os-cfg }} | |
runs-on: ${{ matrix.host.runner }} | |
container: ${{ matrix.host.container }} | |
env: | |
WPI_HOST: ${{matrix.host.os-cfg}} | |
WPI_TARGET: bullseye | |
WPI_TARGET_PORT: armhf | |
WPI_USE_THREADS: 8 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prep MacOS | |
if: contains(matrix.host.runner, 'macos') | |
run: brew install rsync xz gmp mpfr libmpc isl | |
- uses: actions/download-artifact@v3 | |
with: | |
name: bullseye-armhf-sysroot | |
path: output/ | |
- name: Build | |
run: | | |
make frontend | |
rm output/*.tar | |
- name: Test | |
if: matrix.host.testable | |
run: make test | |
- name: Import Apple Developer ID Certificate | |
if: contains(matrix.host.os-cfg, 'macos') && | |
github.repository_owner == 'wpilibsuite' && | |
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) | |
uses: wpilibsuite/import-signing-certificate@v1 | |
with: | |
certificate-data: ${{ secrets.APPLE_CERTIFICATE_DATA }} | |
certificate-passphrase: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} | |
- name: Sign toolchain with Apple Developer ID Certificate | |
if: contains(matrix.host.os-cfg, 'macos') && | |
github.repository_owner == 'wpilibsuite' && | |
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) | |
env: | |
APPLE_DEVELOPER_ID: ${{ secrets.APPLE_DEVELOPER_ID }} | |
run: make sign | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: bullseye-armhf-${{matrix.host.os-cfg }} | |
path: output/* | |
build-platform-utils-bullseye-arm64: | |
needs: build-sysroot-bullseye-arm64 | |
strategy: | |
matrix: | |
host: | |
[ | |
{ | |
os-cfg: windows_x86_64, | |
runner: ubuntu-latest, | |
container: "docker.io/wpilib/opensdk-ubuntu:20.04", | |
testable: false, | |
}, | |
{ | |
os-cfg: macos_x86_64, | |
runner: macos-latest, | |
container: "", | |
testable: true, | |
}, | |
{ | |
os-cfg: macos_arm64, | |
runner: macos-latest, | |
container: "", | |
testable: false, | |
}, | |
] | |
name: Build bullseye-arm64 for ${{ matrix.host.os-cfg }} | |
runs-on: ${{ matrix.host.runner }} | |
container: ${{ matrix.host.container }} | |
env: | |
WPI_HOST: ${{matrix.host.os-cfg}} | |
WPI_TARGET: bullseye | |
WPI_TARGET_PORT: arm64 | |
WPI_USE_THREADS: 8 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prep MacOS | |
if: contains(matrix.host.runner, 'macos') | |
run: brew install rsync xz gmp mpfr libmpc isl | |
- uses: actions/download-artifact@v3 | |
with: | |
name: bullseye-arm64-sysroot | |
path: output/ | |
- name: Build | |
run: | | |
make frontend | |
rm output/*.tar | |
- name: Test | |
if: matrix.host.testable | |
run: make test | |
- name: Import Apple Developer ID Certificate | |
if: contains(matrix.host.os-cfg, 'macos') && | |
github.repository_owner == 'wpilibsuite' && | |
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) | |
uses: wpilibsuite/import-signing-certificate@v1 | |
with: | |
certificate-data: ${{ secrets.APPLE_CERTIFICATE_DATA }} | |
certificate-passphrase: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} | |
- name: Sign toolchain with Apple Developer ID Certificate | |
if: contains(matrix.host.os-cfg, 'macos') && | |
github.repository_owner == 'wpilibsuite' && | |
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) | |
env: | |
APPLE_DEVELOPER_ID: ${{ secrets.APPLE_DEVELOPER_ID }} | |
run: make sign | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: bullseye-arm64-${{matrix.host.os-cfg }} | |
path: output/* | |
build-platform-utils-raspi-bullseye-armhf: | |
needs: build-sysroot-raspi-bullseye-armhf | |
strategy: | |
matrix: | |
host: | |
[ | |
{ | |
os-cfg: windows_x86_64, | |
runner: ubuntu-latest, | |
container: "docker.io/wpilib/opensdk-ubuntu:20.04", | |
testable: false, | |
}, | |
{ | |
os-cfg: macos_x86_64, | |
runner: macos-latest, | |
container: "", | |
testable: true, | |
}, | |
{ | |
os-cfg: macos_arm64, | |
runner: macos-latest, | |
container: "", | |
testable: false, | |
}, | |
] | |
name: Build raspi-bullseye-armhf for ${{ matrix.host.os-cfg }} | |
runs-on: ${{ matrix.host.runner }} | |
container: ${{ matrix.host.container }} | |
env: | |
WPI_HOST: ${{matrix.host.os-cfg}} | |
WPI_TARGET: raspi-bullseye | |
WPI_TARGET_PORT: armhf | |
WPI_USE_THREADS: 8 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prep MacOS | |
if: contains(matrix.host.runner, 'macos') | |
run: brew install rsync xz gmp mpfr libmpc isl | |
- uses: actions/download-artifact@v3 | |
with: | |
name: raspi-bullseye-armhf-sysroot | |
path: output/ | |
- name: Build | |
run: | | |
make frontend | |
rm output/*.tar | |
- name: Test | |
if: matrix.host.testable | |
run: make test | |
- name: Import Apple Developer ID Certificate | |
if: contains(matrix.host.os-cfg, 'macos') && | |
github.repository_owner == 'wpilibsuite' && | |
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) | |
uses: wpilibsuite/import-signing-certificate@v1 | |
with: | |
certificate-data: ${{ secrets.APPLE_CERTIFICATE_DATA }} | |
certificate-passphrase: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} | |
- name: Sign toolchain with Apple Developer ID Certificate | |
if: contains(matrix.host.os-cfg, 'macos') && | |
github.repository_owner == 'wpilibsuite' && | |
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) | |
env: | |
APPLE_DEVELOPER_ID: ${{ secrets.APPLE_DEVELOPER_ID }} | |
run: make sign | |
- uses: actions/upload-artifact@v3 | |
with: | |
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:20.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:20.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:20.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:20.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, 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: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v3 | |
- name: Remove sysroots | |
run: find -name "*.tar" -delete | |
- name: Release | |
uses: ncipollo/[email protected] | |
with: | |
allowUpdates: true | |
artifacts: "**/*" | |
token: ${{ secrets.GITHUB_TOKEN }} |