Merge pull request #1082 from pawosm-arm/dev-eth #678
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: Continuous integration | |
on: [push, pull_request] | |
env: | |
M68K_CROSS_URL: https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/13.1.0/x86_64-gcc-13.1.0-nolibc-m68k-linux.tar.gz | |
M68K_CROSS_DIR: gcc-13.1.0-nolibc | |
concurrency: | |
group: environment-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
strategy: | |
fail-fast: false # keep on building even if one target fails | |
matrix: | |
target: [appleiie, dragon-mooh, dragon-nx32, esp32, esp8266, multicomp09, rbc-mark4, rcbus-6502, rcbus-68008, rpipico, sc108, tiny68k, armm0-libc] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install build deps | |
run: | | |
echo "setup_sh=true" >> $GITHUB_ENV | |
case ${{ matrix.target }} in | |
armm0-libc) | |
PKGS="cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib" | |
echo "target=USERCPU=armm0" >> $GITHUB_ENV | |
echo "sub_target=libs" >> $GITHUB_ENV | |
;; | |
dragon-mooh|dragon-nx32|multicomp09) | |
sudo add-apt-repository -n -y ppa:p-pisati/fuzix | |
sudo add-apt-repository -n -y ppa:tormodvolden/m6809 | |
PKGS="lwtools gcc6809 xroar" | |
echo "target=TARGET=${{ matrix.target }}" >> $GITHUB_ENV | |
echo "flags=CI_TESTING=1" >> $GITHUB_ENV | |
;; | |
esp32) | |
PKGS="esptool" | |
(cd ~ && git clone -b v5.0.2 --depth 1 --recursive https://github.com/espressif/esp-idf.git) | |
(cd ~/esp-idf && ./install.sh esp32) | |
echo "setup_sh=. ~/esp-idf/export.sh" >> $GITHUB_ENV | |
echo "target=TARGET=${{ matrix.target }}" >> $GITHUB_ENV | |
;; | |
esp8266) | |
PKGS="gcc-xtensa-lx106 esptool" | |
echo "target=TARGET=${{ matrix.target }}" >> $GITHUB_ENV | |
;; | |
rbc-mark4|sc108) | |
PKGS="sdcc" | |
echo "target=TARGET=${{ matrix.target }}" >> $GITHUB_ENV | |
echo "sub_target=kernel" >> $GITHUB_ENV | |
;; | |
appleiie|rcbus-6502) | |
PKGS="cc65" | |
echo "target=TARGET=${{ matrix.target }}" >> $GITHUB_ENV | |
;; | |
rcbus-68008|tiny68k) | |
wget -O - "${M68K_CROSS_URL}" | sudo tar zxvf - -C /usr/local | |
echo "/usr/local/${M68K_CROSS_DIR}/m68k-linux/bin" >> $GITHUB_PATH | |
echo "cross_cc=CROSS_COMPILE=m68k-linux-" >> $GITHUB_ENV | |
echo "target=TARGET=${{ matrix.target }}" >> $GITHUB_ENV | |
;; | |
rpipico) | |
PKGS="cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib" | |
echo "target=TARGET=${{ matrix.target }}" >> $GITHUB_ENV | |
echo "sub_target=kernel" >> $GITHUB_ENV | |
;; | |
esac | |
sudo apt-get update -q | |
sudo apt-get install -y byacc automake ${PKGS} | |
sudo update-alternatives --set yacc /usr/bin/byacc | |
- name: make | |
run: ${{ env.setup_sh }} && make ${{ env.cross_cc }} ${{ env.target }} ${{ env.sub_target }} ${{ env.flags }} -j`nproc` | |
- name: target testing | |
run: | | |
if test -x ./Build/tests/test-${{ matrix.target }} ; then \ | |
if test -x ./Build/tests/test-${{ matrix.target }}-prepare ; then | |
./Build/tests/test-${{ matrix.target }}-prepare | |
fi | |
make diskimage ${{ env.target }} && \ | |
./Build/tests/test-${{ matrix.target }} | |
fi |