Skip to content

Add cheri sdk build #25

Add cheri sdk build

Add cheri sdk build #25

name: release experimental with all library versions
on:
push:
branches: [ "dev/staging" ]
jobs:
build:
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
cpu: ["x86_64", "aarch64"]
platform: ["debug", "mmu_linux", "kvm", "cheri"]
build: ["Debug", "Release"]
include:
- host: "ubuntu-24.04"
cpu: "x86_64"
- host: "ubuntu-24.04-arm"
cpu: "aarch64"
exclude:
- cpu: "x86_64"
platform: "cheri"
runs-on: ${{ matrix.host }}
steps:
- uses: actions/checkout@v4
- name: install automake
run: sudo apt-get install automake
- name: install autoconf
run: |
curl -O https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar xvf autoconf-2.69.tar.gz
mkdir bin
mkdir build
cd build
../autoconf-2.69/configure
make && sudo make install
- name: perepare morello clang
if: ${{ matrix.platform == 'cheri' }}
working-directory: ./temp
run: |
git init
git fetch -- https://git.morello-project.org/morello/llvm-project-releases.git +refs/heads/morello/linux-aarch64-release-1.9:refs/remotes/origin/morello/linux-aarch64-release-1.9
git checkout origin/morello/linux-aarch64-release-1.9 -b morello/linux-aarch64-release-1.9
rm /usr/bin/clang
rm /usr/bin/clang++
ln -s $(pwd)/bin/clang /usr/bin/clang
ln -s $(pwd)/bin/clang++ /usr/bin/clang++
- name: Generate build directory name
id: build
run: echo "dir=build_${{ matrix.platform }}_${{ matrix.cpu }}" >> $GITHUB_OUTPUT
- 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: >
cmake -B ${{ steps.build.outputs.dir }}
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_C_COMPILER=clang
-DDANDELION_PLATFORM=${{ matrix.platform }}
-DNEWLIB=ON
-DCMAKE_BUILD_TYPE=${{ matrix.build }}
- name: Build
run: cmake --build ${{ steps.build.outputs.dir }}
- name: Install
run: cmake --install ${{ steps.build.outputs.dir }}
- name: Compress
shell: bash
working-directory: ${{ steps.build.outputs.dir }}
run: tar -czf "dandelion_sdk_${{matrix.build}}_${{matrix.platform}}_${{matrix.cpu}}.tar.gz" dandelion_sdk
- name: Add to release
shell: bash
run: gh release upload experimental "${{ steps.build.outputs.dir }}/dandelion_sdk_${{matrix.build}}_${{matrix.platform}}_${{matrix.cpu}}.tar.gz" --clobber
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}