Skip to content

Commit

Permalink
Merge pull request #5 from pmret/ci
Browse files Browse the repository at this point in the history
Ci
  • Loading branch information
ethteck authored Aug 22, 2021
2 parents b5a9991 + b6ded32 commit 663fc80
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Compile gas

on: [push]

jobs:
build:
runs-on: ${{ matrix.TARGET.OS }}
strategy:
fail-fast: false
matrix:
TARGET:
- {
OS: 'ubuntu-latest',
CFLAGS: '-static',
HOST: 'i386-pc-linux',
ARCHIVE_NAME: 'linux.tar.gz'
}
- {
OS: 'macos-latest',
CFLAGS: '-DDARWIN -static -Wno-return-type -Wno-error -Wno-implicit-function-declaration',
HOST: 'i386-apple-darwin',
ARCHIVE_NAME: 'mac.tar.gz'
}

name: Building gas 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
- name: Configure for mips-nintendo-nu64
shell: bash
run: |
./configure --target=mips-nintendo-nu64 --prefix=/opt/cross --disable-gprof --disable-gdb --disable-werror --host=${{ matrix.TARGET.HOST }} --build=${{ matrix.TARGET.HOST }}
- name: Make
continue-on-error: true
shell: bash
run: |
make CFLAGS="${{ matrix.TARGET.CFLAGS }}"
- name: Test for file
shell: bash
run: |
test -f gas/as-new
file gas/as-new
- name: Create release archive
shell: bash
run: |
cp gas/as-new as
tar -czf ${{ matrix.TARGET.ARCHIVE_NAME }} as
- name: Upload archive
uses: actions/upload-artifact@v2
with:
name: binutils-2.9.1-${{ matrix.TARGET.OS }}
path: |
${{ matrix.TARGET.ARCHIVE_NAME }}
- name: Update release
uses: johnwbyrd/[email protected]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: ${{ matrix.TARGET.ARCHIVE_NAME }}

0 comments on commit 663fc80

Please sign in to comment.