gcc-papermario/.github/workflows/build.yml

63 lines
1.9 KiB
YAML
Raw Normal View History

name: Compile cc1
on: [push]
jobs:
build:
runs-on: ${{ matrix.TARGET.OS }}
strategy:
fail-fast: false
matrix:
TARGET:
- {
OS: 'ubuntu-latest',
CFLAGS: '-std=gnu89 -m32 -static',
HOST: 'i386-pc-linux'
}
- {
OS: 'macos-latest',
CFLAGS: '-std=gnu89 -Wno-return-type -Wno-error -Wno-implicit-function-declaration',
HOST: 'i386-apple-darwin'
}
name: Building cc1 for ${{ matrix.TARGET.OS }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies (Ubuntu)
shell: bash
if: matrix.TARGET.OS == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y build-essential bison file gperf
echo "deb http://old-releases.ubuntu.com/ubuntu zesty main" | sudo tee /etc/apt/sources.list.d/zesty.list
sudo apt-add-repository -r universe
sudo apt update
sudo apt install -y gcc-6 gcc-6-multilib
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 1
- name: Configure
shell: bash
run: |
2021-08-22 15:49:53 +02:00
./configure --target=mips-nintendo-nu64 --prefix=/opt/cross --with-gnu-as --disable-gprof --disable-gdb --disable-werror --host=${{ matrix.TARGET.HOST }} --build=${{ matrix.TARGET.HOST }}
- name: Make
continue-on-error: true
shell: bash
run: |
2021-08-15 12:50:09 +02:00
make cpp CFLAGS="${{ matrix.TARGET.CFLAGS }}"
make cc1 CFLAGS="${{ matrix.TARGET.CFLAGS }}"
make xgcc CFLAGS="${{ matrix.TARGET.CFLAGS }}"
- name: Test for file
shell: bash
run: |
test -f cc1
file cc1
- name: Upload output
uses: actions/upload-artifact@v2
with:
name: cc1-${{ matrix.TARGET.OS }}
2021-08-15 12:50:09 +02:00
path: |
as
cpp
cc1
xgcc