mirror of
https://github.com/usatiuk/ficus.git
synced 2025-10-29 08:37:51 +01:00
generic toolchain build in CI
This commit is contained in:
55
.github/workflows/ficus.yml
vendored
55
.github/workflows/ficus.yml
vendored
@@ -2,17 +2,58 @@ name: Ficus build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: ["main"]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "main" ]
|
branches: ["main"]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: Debug
|
BUILD_TYPE: Debug
|
||||||
BUILD_PARALLEL: 3
|
BUILD_PARALLEL: 3
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
build-generic-toolchain:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install sudo for ACT runner
|
||||||
|
run: apt-get update && apt-get install -y sudo
|
||||||
|
if: env.ACT=='true'
|
||||||
|
|
||||||
|
- name: Cache generic toolchain
|
||||||
|
id: cache-toolchain
|
||||||
|
uses: actions/cache@v3
|
||||||
|
env:
|
||||||
|
cache-name: cache-toolchain
|
||||||
|
with:
|
||||||
|
path: ./toolchain
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('toolchain_scripts/*') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('toolchain_scripts/*') }}
|
||||||
|
|
||||||
|
- if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }}
|
||||||
|
name: Build generic toolchain
|
||||||
|
run: source env.sh && toolchain_scripts/build-all.sh
|
||||||
|
|
||||||
|
- if: ${{ steps.cache-toolchain.outputs.cache-hit != 'true' }}
|
||||||
|
name: Strip toolchain
|
||||||
|
continue-on-error: true
|
||||||
|
run: find toolchain -type f | xargs strip
|
||||||
|
|
||||||
|
- name: Tar the toolchain
|
||||||
|
run: cd ${{github.workspace}} && tar -czvf toolchain-generic.tar.xz toolchain
|
||||||
|
|
||||||
|
- name: Upload ficus toolchain
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: toolchain-generic
|
||||||
|
path: ${{github.workspace}}/toolchain-generic.tar.xz
|
||||||
|
retention-days: 5
|
||||||
|
|
||||||
build-ficus-toolchain:
|
build-ficus-toolchain:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-generic-toolchain
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -24,8 +65,14 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: sudo apt-get update && sudo apt-get install -y cmake build-essential pax gcc g++ nasm bison bzip2 flex mtools texinfo libgmp-dev libmpfr-dev libmpc-dev xorriso
|
run: sudo apt-get update && sudo apt-get install -y cmake build-essential pax gcc g++ nasm bison bzip2 flex mtools texinfo libgmp-dev libmpfr-dev libmpc-dev xorriso
|
||||||
|
|
||||||
- name: Unpack prebuilt toolchain
|
- name: Download toolchain
|
||||||
run: cd ${{github.workspace}} && tar xf toolchain_scripts/toolchain-s1-linux-aarch64.tar.xz
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: toolchain-generic
|
||||||
|
path: ${{github.workspace}}
|
||||||
|
|
||||||
|
- name: Untar the toolchain
|
||||||
|
run: cd ${{github.workspace}} && tar xf toolchain-generic.tar.xz
|
||||||
|
|
||||||
- name: Build ficus toolchain
|
- name: Build ficus toolchain
|
||||||
run: source ${{github.workspace}}/env.sh && ${{github.workspace}}/ficus-toolchain/build-all.sh s2only
|
run: source ${{github.workspace}}/env.sh && ${{github.workspace}}/ficus-toolchain/build-all.sh s2only
|
||||||
|
|||||||
Reference in New Issue
Block a user