Reenable TCC testing on MacOS and hope it works #197
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: CI | |
on: [ push ] | |
jobs: | |
testing: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: | |
- ubuntu-latest | |
- macos-latest | |
compiler: | |
- binary: clang | |
configure-flags: "" | |
- binary: gcc | |
configure-flags: "" | |
- binary: tcc | |
configure-flags: "" | |
- binary: pcc | |
configure-flags: "" | |
unhosted-flag: | |
- "" | |
- "-u" | |
exclude: | |
# TODO (dargueta): Figure out what to do about incompatible headers | |
# - operating-system: macos-latest | |
# compiler: | |
# binary: tcc | |
- operating-system: macos-latest | |
compiler: | |
binary: pcc | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Compilers | |
uses: ConorMacBride/install-package@v1 | |
with: | |
apt: clang gcc-mingw-w64 pcc tcc | |
brew: gcc mingw-w64 | |
# TCC can't be installed via Homebrew on recent versions of macOS because | |
# of an "upstream incompatibility". | |
- name: Install TCC on MacOS | |
if: matrix.operating-system == 'macos-latest' && matrix.compiler.binary == 'tcc' | |
run: make -C make -f compiler-support/install.mk install-tcc | |
- name: Install PCC on MacOS | |
if: matrix.operating-system == 'macos-latest' && matrix.compiler.binary == 'pcc' | |
run: make -C make -f compiler-support/install.mk install-pcc | |
- name: Configure | |
run: | | |
./configure -d \ | |
--cc=${{ matrix.compiler.binary }} \ | |
${{ matrix.unhosted-flag }} \ | |
${{ matrix.compiler.configure-flags }} | |
- name: Compile | |
# env: | |
# # Only needed on OSX for TCC/PCC. This is very hacky and will break if | |
# # they upgrade XCode on the Mac runners. | |
# CFLAGS: >- | |
# -I/Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include | |
# -I/Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include | |
# -I/Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include | |
run: | | |
export C_INCLUDE_PATH="/usr/include:$C_INCLUDE_PATH" ; | |
tcc -vv || true ; | |
make library ; | |
- name: Test Installation | |
run: sudo make install | |
- name: Run Tests | |
run: make test | |
testing-sdcc: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
architecture: | |
- ds390 | |
- ds400 | |
- ez80_z80 | |
- hc08 | |
- mcs51 | |
- mos6502 | |
- pdk13 | |
- pdk14 | |
- pdk15 | |
- r2k | |
- r2ka | |
- r3ka | |
- s08 | |
- sm83 | |
- stm8 | |
- tlcs90 | |
- z180 | |
- z80 | |
- z80n | |
# These require additional work with flags, uncomment later | |
# - pic14 | |
# - pic16 | |
# | |
# Uncomment once we upgrade to 4.3+ | |
# - mos65c02 | |
# - r800 | |
# | |
# Something weird is going on with this one, possibly another SDCC bug. | |
# - TININative | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Dependencies | |
# 4.3.0+ are broken: https://sourceforge.net/p/sdcc/bugs/3715/ | |
run: make -C make -f compiler-support/install.mk install-sdcc SDCC_VERSION=4.2.0 | |
- name: Configure | |
run: ./configure --cc=sdcc -m ${{ matrix.architecture }} | |
- name: Compile | |
run: make library |