mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-28 02:48:04 +00:00
[workflows] Add workflow for building revive in a debian container.
Makefile: Add target 'install-revive' to build revive with the installation path specified by variable REVIVE_INSTALL_DIR. Add utils directory with scripts for building revive in a container. Add utils/build-revive.sh taking option argument '-o <install-dir>' to build revive with the specified install directory. Add utils/revive-builder-debian.dockerfile to make a docker container for building revive in a Debian environment.
This commit is contained in:
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
CONTAINER=revive-builder-debian-x86
|
||||
VERSION=latest
|
||||
DOCKERFILE=revive-builder-debian.dockerfile
|
||||
|
||||
docker build --rm -t ${CONTAINER}:${VERSION} -f ${DOCKERFILE} $@
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
REVIVE_INSTALL_DIR=$(pwd)/target/release
|
||||
while getopts "o:" option ; do
|
||||
case $option in
|
||||
o) # Output directory
|
||||
REVIVE_INSTALL_DIR=$OPTARG
|
||||
;;
|
||||
\?) echo "Error: Invalid option"
|
||||
exit 1;;
|
||||
esac
|
||||
done
|
||||
echo "Installing to ${REVIVE_INSTALL_DIR}"
|
||||
|
||||
$(pwd)/build-llvm.sh
|
||||
export PATH=$(pwd)/llvm18.0/bin:$PATH
|
||||
|
||||
make install-revive REVIVE_INSTALL_DIR=${REVIVE_INSTALL_DIR}
|
||||
@@ -0,0 +1,14 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# Dockerfile for building revive in a Debian container.
|
||||
FROM debian:12
|
||||
RUN <<EOF
|
||||
apt-get update
|
||||
apt-get install -q -y build-essential cmake make ninja-build python3 \
|
||||
libmpfr-dev libgmp-dev libmpc-dev ncurses-dev \
|
||||
git curl
|
||||
EOF
|
||||
ARG RUST_VERSION=stable
|
||||
RUN <<EOF
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${RUST_VERSION}
|
||||
EOF
|
||||
ENV PATH=/root/.cargo/bin:${PATH}
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
CONTAINER=revive-builder-debian-x86
|
||||
VERSION=latest
|
||||
|
||||
docker run --rm -v $(pwd):$(pwd) -w $(pwd) ${CONTAINER}:${VERSION} $@
|
||||
Reference in New Issue
Block a user