mirror of
https://github.com/usatiuk/ficus.git
synced 2025-10-29 00:27:52 +01:00
CI: build in ci, more streamlined toolchain
Reviewed-on: #2 Co-authored-by: Stepan Usatiuk <stepan@usatiuk.com> Co-committed-by: Stepan Usatiuk <stepan@usatiuk.com>
This commit is contained in:
82
.github/workflows/ficus.yml
vendored
Normal file
82
.github/workflows/ficus.yml
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
name: Ficus build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Debug
|
||||
BUILD_PARALLEL: 3
|
||||
BUILD_PARALLEL_GCC: 3
|
||||
|
||||
jobs:
|
||||
build-ficus-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: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y cmake build-essential 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: Build ficus toolchain
|
||||
run: source ${{github.workspace}}/env.sh && ${{github.workspace}}/ficus-toolchain/build-all.sh s2only
|
||||
|
||||
- name: Tar the toolchain
|
||||
run: cd ${{github.workspace}} && tar -czvf toolchain-ficus.tar.xz toolchain sysroot
|
||||
|
||||
- name: Upload ficus toolchain
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: toolchain-ficus
|
||||
path: ${{github.workspace}}/toolchain-ficus.tar.xz
|
||||
retention-days: 5
|
||||
|
||||
iso:
|
||||
needs: build-ficus-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: Install dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y cmake build-essential gcc g++ nasm bison bzip2 flex mtools texinfo libgmp-dev libmpfr-dev libmpc-dev xorriso
|
||||
|
||||
- name: Download toolchain
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: toolchain-ficus
|
||||
path: ${{github.workspace}}
|
||||
|
||||
- name: Untar the toolchain
|
||||
run: cd ${{github.workspace}} && tar xf toolchain-ficus.tar.xz
|
||||
|
||||
- name: Configure CMake
|
||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||
run: source ${{github.workspace}}/env.sh && cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DFICUS_ROOT=${{github.workspace}} -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/CMake-x86_64-ficus-toolchain.cmake
|
||||
|
||||
- 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}}
|
||||
|
||||
- name: Upload isos
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: iso
|
||||
path: ${{github.workspace}}/build/**/*.iso
|
||||
retention-days: 5
|
||||
3
.github/workflows/unit.yml
vendored
3
.github/workflows/unit.yml
vendored
@@ -10,6 +10,7 @@ env:
|
||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||
BUILD_TYPE: Debug
|
||||
TEST_MODE: UNIT
|
||||
BUILD_PARALLEL: 3
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -34,7 +35,7 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
# Build your program with the given configuration
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc)
|
||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel ${{env.BUILD_PARALLEL}}
|
||||
|
||||
- name: Test
|
||||
# Execute tests defined by the CMake configuration.
|
||||
|
||||
Reference in New Issue
Block a user