Skip to content

Applying latest microkit changes. #3

Applying latest microkit changes.

Applying latest microkit changes. #3

Workflow file for this run

name: CI
on:
# Run the CI on any activity on the main or dev branch as well as on any pull
# request activity (e.g when it is created and also when it is updated).
pull_request:
push:
branches: [ "main", "dev", "workshop" ]
# @ivanv: The primary issue with the following CI is that it does not control
# the dependencies of the system enough. We are at the mercy of the GitHub VMs
# to not break the dependencies by updating a version of something etc.
# Ideally we would instead install specific versions of everything, or build
# everything from specified source code commits.
jobs:
build_linux:
name: Build and upload SDK (Linux x86-64)
runs-on: ubuntu-20.04
steps:
- name: Checkout seL4 Core Platform repository
uses: actions/checkout@v3
- name: Checkout seL4 repository
uses: actions/checkout@v3
with:
repository: Ivan-Velickovic/seL4
ref: microkit-dev
path: seL4
- name: Install SDK dependencies (apt)
run: |
sudo apt update
sudo apt install \
cmake pandoc device-tree-compiler ninja-build \
texlive-fonts-recommended texlive-formats-extra libxml2-utils \
gcc-aarch64-linux-gnu python3.9 python3-pip python3.9-venv \
musl-tools
- name: Install Nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
# Unfortunately `apt` decides to ship really old versions of QEMU,
# too old for our purposes as seL4 requires a newer version of QEMU.
# The CI is too slow to build QEMU from source, so we just install
# Nix instead.
- name: Install SDK dependencies (Nix)
run: nix-env -i qemu -f '<nixpkgs>'
- name: Download and install AArch64 GCC toolchain
run: |
wget -O aarch64-toolchain.tar.gz https://sel4.ivanvelickovic.com/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-elf.tar.xz%3Frev%3D73ff9780c12348b1b6772a1f54ab4bb3
tar xf aarch64-toolchain.tar.gz
echo "$(pwd)/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-elf/bin" >> $GITHUB_PATH
- name: Check SHA256 of AArch64 GCC toolchain
run: |
echo "fb9e562a90de1b3a2961b952193c1c6520872aa1482c0a5e0ab79970ec6e7690 aarch64-toolchain.tar.gz" | sha256sum -c
- name: Download and install RISC-V GCC toolchain
run: |
wget -O riscv-toolchain.tar.gz https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.12/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
tar xf riscv-toolchain.tar.gz
echo "$(pwd)/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14/bin" >> $GITHUB_PATH
- name: Build SDK
run: |
python3.9 -m venv pyenv
./pyenv/bin/pip install --upgrade pip setuptools wheel
./pyenv/bin/pip install -r requirements.txt --no-cache-dir
./pyenv/bin/python build_sdk.py --sel4=seL4
- name: Test SDK
run: ./pyenv/bin/python ./ci/test.py
- name: Get shortened commit SHA
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Archive SDK
uses: actions/upload-artifact@v3
with:
name: microkit-sdk-${{ github.ref_name }}-${{ steps.vars.outputs.sha_short }}-linux-x86-64
path: ./release/microkit-sdk-1.2.6.tar.gz
build_macos_x86_64:
name: Build and upload SDK (macOS x86-64)
runs-on: macos-12
steps:
- name: Checkout seL4 Core Platform repository
uses: actions/checkout@v3
- name: Checkout seL4 repository
uses: actions/checkout@v3
with:
repository: Ivan-Velickovic/seL4
ref: microkit-dev
path: seL4
- name: Install SDK dependencies
run: |
brew tap messense/macos-cross-toolchains
brew install pandoc cmake dtc ninja qemu libxml2 [email protected] coreutils aarch64-unknown-linux-gnu texlive
- name: Download and install AArch64 GCC toolchain
run: |
wget -O aarch64-toolchain.tar.gz https://sel4.ivanvelickovic.com/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-aarch64-none-elf.tar.xz%3Frev%3D51c39c753f8c4a54875b7c5dccfb84ef
tar xf aarch64-toolchain.tar.gz
echo "$(pwd)/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-aarch64-none-elf/bin" >> $GITHUB_PATH
- name: Check SHA256 of AArch64 GCC toolchain
run: |
echo "cb8ee50df1d54135dc0e57a1787eda8c090fa5561aaa20fcbcc0548dfb8dceb2 aarch64-toolchain.tar.gz" | sha256sum -c
- name: Download and install RISC-V GCC toolchain
run: |
wget -O riscv-toolchain.tar.gz https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.12/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-apple-darwin.tar.gz
tar xf riscv-toolchain.tar.gz
echo "$(pwd)/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-apple-darwin/bin" >> $GITHUB_PATH
- name: Build SDK
run: |
python3.9 -m venv pyenv
./pyenv/bin/pip install --upgrade pip setuptools wheel
./pyenv/bin/pip install -r requirements.txt --no-cache-dir
./pyenv/bin/python build_sdk.py --sel4=seL4
- name: Test SDK
run: ./pyenv/bin/python ./ci/test.py
- name: Get shortened commit SHA
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Archive SDK
uses: actions/upload-artifact@v3
with:
name: microkit-sdk-${{ github.ref_name }}-${{ steps.vars.outputs.sha_short }}-macos-x86-64
path: ./release/microkit-sdk-1.2.6.tar.gz
build_macos_aarch64:
name: Build and upload SDK (macOS AArch64)
runs-on: macos-12
steps:
- name: Checkout seL4 Core Platform repository
uses: actions/checkout@v3
- name: Checkout seL4 repository
uses: actions/checkout@v3
with:
repository: Ivan-Velickovic/seL4
ref: microkit-dev
path: seL4
- name: Install SDK dependencies
run: |
brew tap messense/macos-cross-toolchains
brew install pandoc cmake dtc ninja qemu libxml2 [email protected] coreutils aarch64-unknown-linux-gnu texlive
- name: Download and install AArch64 GCC toolchain
run: |
wget -O aarch64-toolchain.tar.gz https://sel4.ivanvelickovic.com/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-aarch64-none-elf.tar.xz%3Frev%3D51c39c753f8c4a54875b7c5dccfb84ef
tar xf aarch64-toolchain.tar.gz
echo "$(pwd)/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-aarch64-none-elf/bin" >> $GITHUB_PATH
- name: Check SHA256 of AArch64 GCC toolchain
run: |
echo "cb8ee50df1d54135dc0e57a1787eda8c090fa5561aaa20fcbcc0548dfb8dceb2 aarch64-toolchain.tar.gz" | sha256sum -c
- name: Download and install RISC-V GCC toolchain
run: |
wget -O riscv-toolchain.tar.gz https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.12/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-apple-darwin.tar.gz
tar xf riscv-toolchain.tar.gz
echo "$(pwd)/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-apple-darwin/bin" >> $GITHUB_PATH
- name: Build SDK
run: |
python3.9 -m venv pyenv
./pyenv/bin/pip install --upgrade pip setuptools wheel
./pyenv/bin/pip install -r requirements.txt --no-cache-dir
./pyenv/bin/python build_sdk.py --sel4=seL4 --tool-target-triple=aarch64-apple-darwin
# Since we're cross compiling the tool and not actually running on AArch64, we can't test
# the tool like we usually would
- name: Get shortened commit SHA
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Archive SDK
uses: actions/upload-artifact@v3
with:
name: microkit-sdk-${{ github.ref_name }}-${{ steps.vars.outputs.sha_short }}-macos-aarch64
path: ./release/microkit-sdk-1.2.6.tar.gz