@@ -29,33 +29,46 @@ jobs:
2929 - name : ci-format
3030 run : pushd examples; ./format_all.sh || exit; popd
3131
32- # Build on the newest-available OS with newest-available compilers
33- ci-build-latest :
32+ ci-build :
33+ # Build on the newest-available OS with newest-available compilers and with
34+ # default compiler versions from the oldest current Ubuntu LTS
3435 strategy :
3536 matrix :
36- os : [ubuntu-latest]
37- # The type of runner that the job will run on
37+ os : [ubuntu-latest, ubuntu-22.04]
3838 runs-on : ${{ matrix.os }}
3939
40- # Steps represent a sequence of tasks that will be executed as part of the job
4140 steps :
42- # Install latest ARM toolchains
43- - uses : carlosperate/arm-none-eabi-gcc-action@v1
41+ # ##########################################
42+ # Install toolchains for ubuntu-latest
43+ - name : Install ARM toolchain (ubuntu latest)
44+ if : ${{ matrix.os == 'ubuntu-latest' }}
45+ uses : carlosperate/arm-none-eabi-gcc-action@v1
4446 with :
4547 release : ' latest'
46- # Install latest RISC-V toolchains, uses xPack
47- # https://xpack-dev-tools.github.io/
48- - name : setup-riscv-toolchain
48+ - name : Install RISC-V toolchain (ubuntu latest)
49+ if : ${{ matrix.os == 'ubuntu-latest' }}
50+ # Install latest RISC-V toolchains, uses xPack
51+ # https://xpack-dev-tools.github.io/
4952 run : |
5053 npm install --location=global xpm@latest
5154 xpm install --global @xpack-dev-tools/riscv-none-elf-gcc@latest
5255 tree -a "$HOME/.local/xPacks/@xpack-dev-tools/riscv-none-elf-gcc/" || echo "nope"
5356 echo "$HOME/.local/xPacks/@xpack-dev-tools/riscv-none-elf-gcc/14.2.0-3.1/.content/bin" >> "$GITHUB_PATH"
54- # Report what's installed
57+
58+ # ##########################################
59+ # Install toolchains for ubuntu LTS
60+ # Use apt to ensure we are matching 'out of the box' LTS
61+ - name : Install Toolchains
62+ if : ${{ matrix.os == 'ubuntu-22.04' }}
63+ run : sudo apt-get install -y gcc-arm-none-eabi gcc-riscv64-unknown-elf
64+
65+ # ##########################################
66+ # Report what toolchains are installed
5567 - name : report-toolchain-versions
5668 run : |
5769 arm-none-eabi-gcc --version
58- riscv-none-elf-gcc --version
70+ riscv-none-elf-gcc --version || riscv64-unknown-elf-gcc --version
71+
5972 # ##########################################
6073 # libtock-c specific build steps begin here
6174 - uses : actions/checkout@v4
7083 - name : ci-debug-build
7184 run : pushd examples/blink; make debug RAM_START=0x20004000 FLASH_INIT=0x30051 || exit; popd
7285
73- # Build with compiler versions from the oldest current Ubuntu LTS
74- ci-build-legacy :
75- strategy :
76- matrix :
77- os : [ubuntu-22.04]
78- # The type of runner that the job will run on
79- runs-on : ${{ matrix.os }}
80-
81- steps :
82- # Install all toolchains with apt to ensure we are matching 'out of the box' LTS
83- - name : install-toolchains
84- run : sudo apt-get install -y gcc-arm-none-eabi gcc-riscv64-unknown-elf
85- - name : report-toolchain-versions
86- run : |
87- arm-none-eabi-gcc --version
88- riscv64-unknown-elf-gcc --version
89- # ##########################################
90- # libtock-c specific build steps begin here
91- - uses : actions/checkout@v4
92- with :
93- submodules : recursive
94- show-progress : false
95- - name : ci-build
96- run : pushd examples; ./build_all.sh || exit; popd
97- - name : ci-debug-build
98- run : pushd examples/blink; make debug RAM_START=0x20004000 FLASH_INIT=0x30051 || exit; popd
0 commit comments