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