mirror of
https://github.com/usatiuk/ficus.git
synced 2025-10-28 08:07:52 +01:00
Compare commits
2 Commits
04b14863e5
...
318f322f2a
| Author | SHA1 | Date | |
|---|---|---|---|
| 318f322f2a | |||
| 913fd3330e |
91
.github/workflows/ficus.yml
vendored
91
.github/workflows/ficus.yml
vendored
@@ -8,7 +8,6 @@ on:
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Debug
|
||||
BUILD_PARALLEL: 3
|
||||
|
||||
jobs:
|
||||
build-ficus-toolchain:
|
||||
@@ -24,12 +23,94 @@ jobs:
|
||||
- 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
|
||||
|
||||
- name: Unpack prebuilt toolchain
|
||||
run: cd ${{github.workspace}} && tar xf toolchain_scripts/toolchain-s1-linux-aarch64.tar.xz
|
||||
- name: Cache generic toolchain
|
||||
id: cache-toolchain
|
||||
uses: actions/cache/restore@v4
|
||||
env:
|
||||
cache-name: cache-toolchain
|
||||
with:
|
||||
path: |
|
||||
toolchain/gcc-i686-elf-prefix
|
||||
toolchain/gcc-x86_64-elf-prefix
|
||||
toolchain/grub
|
||||
toolchain/limine
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('toolchain_scripts/*') }}
|
||||
|
||||
- name: Build ficus toolchain
|
||||
- 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: Save generic toolchain
|
||||
id: cache-toolchain-save
|
||||
uses: actions/cache/save@v4
|
||||
env:
|
||||
cache-name: cache-toolchain
|
||||
with:
|
||||
path: |
|
||||
toolchain/gcc-i686-elf-prefix
|
||||
toolchain/gcc-x86_64-elf-prefix
|
||||
toolchain/grub
|
||||
toolchain/limine
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('toolchain_scripts/*') }}
|
||||
|
||||
- name: Cache s1 toolchain
|
||||
id: cache-toolchain-s1
|
||||
uses: actions/cache/restore@v4
|
||||
env:
|
||||
cache-name: cache-toolchain-s1
|
||||
with:
|
||||
path: |
|
||||
toolchain/gcc-x86_64-ficus-prefix
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('ficus-toolchain/*.sh') }}
|
||||
|
||||
- if: ${{ steps.cache-toolchain-s1.outputs.cache-hit != 'true' }}
|
||||
name: Build ficus toolchain s1
|
||||
run: source ${{github.workspace}}/env.sh && ${{github.workspace}}/ficus-toolchain/build-all.sh s1only
|
||||
|
||||
- if: ${{ steps.cache-toolchain-s1.outputs.cache-hit != 'true' }}
|
||||
name: Strip toolchain
|
||||
continue-on-error: true
|
||||
run: find toolchain -type f | xargs strip
|
||||
|
||||
- name: Save s1 toolchain
|
||||
id: cache-toolchain-s1-save
|
||||
uses: actions/cache/save@v4
|
||||
env:
|
||||
cache-name: cache-toolchain-s1
|
||||
with:
|
||||
path: |
|
||||
toolchain/gcc-x86_64-ficus-prefix
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('ficus-toolchain/*.sh') }}
|
||||
|
||||
- name: Cache s2 toolchain
|
||||
id: cache-toolchain-s2
|
||||
uses: actions/cache/restore@v4
|
||||
env:
|
||||
cache-name: cache-toolchain-s2
|
||||
with:
|
||||
path: |
|
||||
toolchain/gcc-x86_64-ficus-prefix
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('ficus-toolchain/*.sh') }}-${{ hashFiles('ficus-toolchain/newlib/**/*') }}
|
||||
|
||||
- if: ${{ steps.cache-toolchain-s2.outputs.cache-hit != 'true' }}
|
||||
name: Build ficus toolchain s2
|
||||
run: source ${{github.workspace}}/env.sh && ${{github.workspace}}/ficus-toolchain/build-all.sh s2only
|
||||
|
||||
- name: Save s2 toolchain
|
||||
id: cache-toolchain-s2-save
|
||||
uses: actions/cache/save@v4
|
||||
env:
|
||||
cache-name: cache-toolchain-s2
|
||||
with:
|
||||
path: |
|
||||
toolchain/gcc-x86_64-ficus-prefix
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('ficus-toolchain/*.sh') }}-${{ hashFiles('ficus-toolchain/newlib/**/*') }}
|
||||
|
||||
- name: Tar the toolchain
|
||||
run: cd ${{github.workspace}} && tar -czvf toolchain-ficus.tar.xz toolchain sysroot
|
||||
|
||||
@@ -71,7 +152,7 @@ jobs:
|
||||
|
||||
- name: Build iso
|
||||
# Build your program with the given configuration
|
||||
run: source ${{github.workspace}}/env.sh && cmake --build ${{github.workspace}}/build --target iso --config ${{env.BUILD_TYPE}} --parallel ${{env.BUILD_PARALLEL}}
|
||||
run: source ${{github.workspace}}/env.sh && cmake --build ${{github.workspace}}/build --target iso --config ${{env.BUILD_TYPE}} --parallel $(nproc)
|
||||
|
||||
- name: Upload isos
|
||||
uses: actions/upload-artifact@v3
|
||||
|
||||
3
.github/workflows/unit.yml
vendored
3
.github/workflows/unit.yml
vendored
@@ -10,7 +10,6 @@ env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Debug
|
||||
TEST_MODE: UNIT
|
||||
BUILD_PARALLEL: 3
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -35,7 +34,7 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
# Build your program with the given configuration
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.BUILD_PARALLEL}}
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc)
|
||||
|
||||
- name: Test
|
||||
# Execute tests defined by the CMake configuration.
|
||||
|
||||
@@ -8,12 +8,6 @@ export PREFIX="$FICUS_ROOT/toolchain/gcc-x86_64-ficus-prefix/"
|
||||
export TARGET=x86_64-ficus
|
||||
export PATH="$PREFIX/bin:$PATH"
|
||||
|
||||
if [ -z "${BUILD_PARALLEL}" ]
|
||||
then
|
||||
if [ -z "${BUILD_PARALLEL}" ]; then
|
||||
export BUILD_PARALLEL=$(nproc)
|
||||
fi
|
||||
|
||||
if [ -z "${BUILD_PARALLEL}" ]
|
||||
then
|
||||
export BUILD_PARALLEL=$BUILD_PARALLEL
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user