File tree Expand file tree Collapse file tree 4 files changed +80
-0
lines changed
Expand file tree Collapse file tree 4 files changed +80
-0
lines changed Original file line number Diff line number Diff line change 1+ # Build sched_ext schedulers
2+
3+ This action builds schedulers from https://github.com/sched-ext/scx/
4+
5+ ## Required inputs
6+
7+ * ` output-dir ` - Path to the output directory, where built artifacts will be placed.
8+
9+ ## Environment variables
10+
11+ * ` LLVM_VERSION ` - LLVM (clang) version. Default: ` 20 ` .
12+ * ` SCX_ROOT ` - Path to the SCX repository. If not set (default), the action will clone the main branch of https://github.com/sched-ext/scx to a temporary directory.
Original file line number Diff line number Diff line change 1+ name : ' Build sched-ext/scx'
2+ inputs :
3+ output-dir :
4+ description : ' Path to the output of scx build'
5+ required : true
6+
7+ runs :
8+ using : " composite"
9+ steps :
10+
11+ - name : Install sched-ext/scx dependencies
12+ shell : bash
13+ run : ${GITHUB_ACTION_PATH}/install-dependencies.sh
14+
15+ - name : Build sched-ext/scx
16+ env :
17+ OUTPUT_DIR : ${{ inputs.output-dir }}
18+ shell : bash
19+ run : ${GITHUB_ACTION_PATH}/build-scheds.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -euo pipefail
4+
5+ export LLVM_VERSION=${LLVM_VERSION:- 20}
6+ export SCX_ROOT=${SCX_ROOT:- }
7+
8+ if [[ -z " $SCX_ROOT " ]]; then
9+ export SCX_ROOT=$( mktemp -d scx.XXXX)
10+ git clone --depth=1 --branch=main https://github.com/sched-ext/scx.git $SCX_ROOT
11+ fi
12+
13+ pushd $SCX_ROOT
14+ . $HOME /.cargo/env
15+ meson setup build
16+ meson compile -C build
17+ rm -rf $OUTPUT_DIR
18+ mv build $OUTPUT_DIR
19+ popd
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -euo pipefail
4+
5+ export DEBIAN_FRONTEND=noninteractive
6+ export LLVM_VERSION=${LLVM_VERSION:- 20}
7+
8+ # Assume Ubuntu/Debian
9+ sudo -E apt-get -y update
10+
11+ # Install LLVM
12+ sudo -E apt-get -y install lsb-release wget software-properties-common gnupg
13+ wget https://apt.llvm.org/llvm.sh
14+ chmod +x llvm.sh
15+ sudo -E ./llvm.sh ${LLVM_VERSION}
16+ rm llvm.sh
17+
18+ # We have to set up the alternatives because meson expects
19+ # clang and llvm-strip commands to be available
20+ sudo update-alternatives --install \
21+ /usr/bin/clang clang /usr/bin/clang-${LLVM_VERSION} 10
22+ sudo update-alternatives --install \
23+ /usr/bin/llvm-strip llvm-strip /usr/bin/llvm-strip-${LLVM_VERSION} 10
24+
25+ # Install Rust
26+ curl --proto ' =https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
27+
28+ sudo -E apt-get -y install \
29+ build-essential libssl-dev libelf-dev meson cmake pkg-config jq \
30+ protobuf-compiler libseccomp-dev
You can’t perform that action at this time.
0 commit comments