Skip to content

Build mipsel only

Build mipsel only #60

Workflow file for this run

on:
push:
branches:
- 'build/*'
tags: [ 'v*' ]
workflow_dispatch:
name: Build x86_64
jobs:
build:
name: Build
runs-on: macos-10.15
strategy:
fail-fast: false
matrix:
target:
- mipsel-unknown-linux-gnu
steps:
- uses: actions/checkout@v3
- name: Install crosstool-ng
run: |
brew install coreutils crosstool-ng
- name: Mount volumes
run: |
set -ex
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 16g -volname build build.dmg
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 1g -volname tools tools.dmg
hdiutil attach build.dmg.sparseimage
hdiutil attach tools.dmg.sparseimage
ls /Volumes
- name: Build Toolchain
run: |
set -ex
mkdir /Volumes/build/src
cd ${{ matrix.target }}
ct-ng build -j $(($(nproc) - 1))
- name: Tail build.log on failure
if: ${{ failure() }}
run: tail -n 500 ${{ matrix.target }}/build.log
- name: Archive Toolchain
run: |
set -ex
cd /Volumes/tools
tar czf ${{ matrix.target }}-x86_64-darwin.tar.gz ${{ matrix.target }}
cd -
mv /Volumes/tools/${{ matrix.target }}-x86_64-darwin.tar.gz .
sha256sum ${{ matrix.target }}-x86_64-darwin.tar.gz | tee ${{ matrix.target }}-x86_64-darwin.tar.gz.sha256
- name: Upload Toolchain
uses: actions/upload-artifact@v3
with:
name: toolchains
path: ${{ matrix.target }}-x86_64-darwin.tar.gz
if-no-files-found: error
- name: Upload Toolchain to GitHub Release
uses: svenstaro/upload-release-action@v2
if: "startsWith(github.ref, 'refs/tags/')"
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ matrix.target }}-x86_64-darwin.tar.gz*
file_glob: true
tag: ${{ github.ref }}