Browse Source

Various CI updates

master
Ray Burgemeestre 1 month ago
parent
commit
019ea9d606
6 changed files with 70 additions and 38 deletions
  1. +5
    -5
      Dockerfile-ubuntu2404
  2. +6
    -1
      Makefile
  3. +2
    -2
      apt-publisher/Makefile
  4. +3
    -1
      starcry/Makefile
  5. +28
    -23
      v8pp/Makefile
  6. +26
    -6
      v8pp/build-v8.sh

+ 5
- 5
Dockerfile-ubuntu2404 View File

# more recent versions of boost that the system CMake doesn't now about. # more recent versions of boost that the system CMake doesn't now about.
# I chose a bloody new boost, so I need to use the latest RC1 (at the time of writing) # I chose a bloody new boost, so I need to use the latest RC1 (at the time of writing)
# EDIT: actually we can get rid of this block, Ubuntu 22.04 has a recent enough version already # EDIT: actually we can get rid of this block, Ubuntu 22.04 has a recent enough version already
#RUN wget https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1.tar.gz && \
# tar -zxf cmake-3.24.1.tar.gz && \
# cd cmake-3.24.1 && \
#RUN wget https://github.com/Kitware/CMake/releases/download/v3.31.7/cmake-3.31.7.tar.gz && \
# tar -zxf cmake-3.31.7.tar.gz && \
# cd cmake-3.31.7 && \
# ./bootstrap && \ # ./bootstrap && \
# make -j $(nproc) && \ # make -j $(nproc) && \
# make install && \ # make install && \
# cd .. && \ # cd .. && \
# rm -rf cmake-3.24.1 && \
# rm -rf cmake-3.24.1.tar.gz
# rm -rf cmake-3.31.7 && \
# rm -rf cmake-3.31.7.tar.gz


RUN sudo apt-get update && \ RUN sudo apt-get update && \
sudo apt-get install -y cmake sudo apt-get install -y cmake

+ 6
- 1
Makefile View File

make -C v8pp build make -C v8pp build
make -C vivid build make -C vivid build
make -C starcry build make -C starcry build
make -C msxsaver
make -C msxsaver build


prepare: ## prepare and publish build container prepare: ## prepare and publish build container
sudo chown trigen:trigen . -R sudo chown trigen:trigen . -R
publish: ## publish build deb packages publish: ## publish build deb packages
. env.sh; make -C apt-publisher build . env.sh; make -C apt-publisher build


ci_all: # run all CI
make prepare
make build
make publish

ubuntu1804: ubuntu1804:
docker build . -f Dockerfile-ubuntu1804 -t rayburgemeestre/build-ubuntu:18.04 docker build . -f Dockerfile-ubuntu1804 -t rayburgemeestre/build-ubuntu:18.04



+ 2
- 2
apt-publisher/Makefile View File



apt-ubuntu2404: apt-ubuntu2404:
wget -c $$SECRET_URL 1>/dev/null 2>/dev/null wget -c $$SECRET_URL 1>/dev/null 2>/dev/null
tar -zxvf *secret.tar.gz
tar -zxvf *secret.tar.gz || true
make prepare-packages-ubuntu2404 make prepare-packages-ubuntu2404
make update-packages-ubuntu2404 make update-packages-ubuntu2404




update-packages-ubuntu2404: update-packages-ubuntu2404:
docker pull rayburgemeestre/apt-ubuntu:22.04 docker pull rayburgemeestre/apt-ubuntu:22.04
docker run -t -v $$PWD:$$PWD -v $$PWD/gnupg:/root/.gnupg -v $$PWD/repo:/repo --workdir $$PWD rayburgemeestre/apt-ubuntu:24.04 /bin/sh -c "reprepro -b /repo includedeb noble packages/*.deb"
docker run -t -v $$PWD:$$PWD -v $$PWD/gnupg:/root/.gnupg -v $$PWD/repo:/repo --workdir $$PWD rayburgemeestre/apt-ubuntu:24.04 /bin/sh -c "find packages -type f -name '*.deb' | xargs -n 1 reprepro -b /repo includedeb noble "
docker run -t -v $$PWD:$$PWD -v $$PWD/gnupg:/root/.gnupg -v $$PWD/repo:/repo --workdir $$PWD rayburgemeestre/apt-ubuntu:24.04 /bin/sh -c "reprepro -b /repo list noble" docker run -t -v $$PWD:$$PWD -v $$PWD/gnupg:/root/.gnupg -v $$PWD/repo:/repo --workdir $$PWD rayburgemeestre/apt-ubuntu:24.04 /bin/sh -c "reprepro -b /repo list noble"
# echo produce artifact for debugging # echo produce artifact for debugging
tar -czf repo.tar.gz repo tar -czf repo.tar.gz repo

+ 3
- 1
starcry/Makefile View File

ubuntu2404: ubuntu2404:
git clone --recursive https://github.com/rayburgemeestre/starcry || true git clone --recursive https://github.com/rayburgemeestre/starcry || true
pushd starcry && \ pushd starcry && \
git pull --rebase && \
git fetch --all && \
git rebase origin/master && \
git submodule update --init --recursive && \
make clean && \ make clean && \
make all && \ make all && \
make build-image && \ make build-image && \

+ 28
- 23
v8pp/Makefile View File

SHELL:=/bin/bash SHELL:=/bin/bash


VERSION:=10.0.139.9
#VERSION:=11.9.169.4 #VERSION:=11.9.169.4
VERSION:=13.0.245.25
#VERSION:=13.0.245.25


build: cppse-v8_$(VERSION)_amd64.deb build: cppse-v8_$(VERSION)_amd64.deb


# # also packages v8pp for now # # also packages v8pp for now
# make fpm_package # make fpm_package
# bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions # bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions
ubuntu2204:
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git || true
#git clone -b v1.8.1 https://github.com/pmed/v8pp || true , next version 1.8.2, will probably contain the fix for clang-14 as well. for now..
git clone -b master https://github.com/pmed/v8pp # ..we'll use master.
bash ../ubuntu2204.sh make impl # prepares packaging as well
make fpm_package
bash ../ubuntu2204.sh chown $$(id -u):$$(id -g) . -R # fix permissions
#
#ubuntu2204:
# git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git || true
# #git clone -b v1.8.1 https://github.com/pmed/v8pp || true , next version 1.8.2, will probably contain the fix for clang-14 as well. for now..
# git clone -b master https://github.com/pmed/v8pp # ..we'll use master.
# bash ../ubuntu2204.sh make impl # prepares packaging as well
# make fpm_package
# bash ../ubuntu2204.sh chown $$(id -u):$$(id -g) . -R # fix permissions


ubuntu2404: ubuntu2404:
rm -rfv depot_tools rm -rfv depot_tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git || true git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git || true
#git clone -b v1.8.1 https://github.com/pmed/v8pp || true , next version 1.8.2, will probably contain the fix for clang-14 as well. for now.. #git clone -b v1.8.1 https://github.com/pmed/v8pp || true , next version 1.8.2, will probably contain the fix for clang-14 as well. for now..
git clone -b master https://github.com/pmed/v8pp || true # ..we'll use master.
bash ../ubuntu2404.sh make impl # prepares packaging as well
#git clone -b master https://github.com/pmed/v8pp || true # ..we'll use master.
git clone -b v2.1.1 https://github.com/pmed/v8pp || true # ..we'll use master.
make impl1 # v8 only, doesn't deal with docker rootless very well
# no v8pp anymore: bash ../ubuntu2404.sh make impl2 # prepares packaging as well
make fpm_package make fpm_package
bash ../ubuntu2404.sh chown $$(id -u):$$(id -g) . -R # fix permissions bash ../ubuntu2404.sh chown $$(id -u):$$(id -g) . -R # fix permissions


impl:
impl1:
# see issue https://exerror.com/fatal-detected-dubious-ownership-in-repository/ # see issue https://exerror.com/fatal-detected-dubious-ownership-in-repository/
git config --global --add safe.directory '*'
switch-to-latest-clang
apt-get update
#git config --global --add safe.directory '*'
#switch-to-latest-clang
#apt-get update
#apt-get install pkg-config python2.7 -y #apt-get install pkg-config python2.7 -y
#cp -prv /usr/bin/python2.7 /usr/bin/python # stupid depot tool scripts #cp -prv /usr/bin/python2.7 /usr/bin/python # stupid depot tool scripts
#cp -prv /usr/bin/python2.7 /usr/bin/python2 # stupid depot tool scripts #cp -prv /usr/bin/python2.7 /usr/bin/python2 # stupid depot tool scripts
./build-v8.sh ./build-v8.sh
make prepare-package-v8 make prepare-package-v8

impl2:
./build-v8pp.sh # basically only produces the v8pp/config.hpp (from config.hpp.in) ./build-v8pp.sh # basically only produces the v8pp/config.hpp (from config.hpp.in)
make prepare-package-v8pp make prepare-package-v8pp




prepare-package-v8: prepare-package-v8:
rm -rf out rm -rf out
rm -rf v8pp_*_amd64.deb
mkdir -p out/opt/cppse/build/v8pp/lib
mkdir -p out/opt/cppse/build/v8pp/include
cp -prv v8/out/x64.release/obj/libv8_monolith.a out/opt/cppse/build/v8pp/lib
cp -prv v8/include out/opt/cppse/build/v8pp/include/v8
mkdir -p out/opt/cppse/build/v8/lib
mkdir -p out/opt/cppse/build/v8/include
cp -prv v8/out/x64.release/obj/libv8_monolith.a out/opt/cppse/build/v8/lib
cp -prv v8/include out/opt/cppse/build/v8/include/v8


prepare-package-v8pp: prepare-package-v8pp:
ls -alh v8pp/v8pp/config.hpp* || true
cp -prv v8pp/v8pp out/opt/cppse/build/v8pp/include/
# no v8pp anymore: ls -alh v8pp/v8pp/config.hpp* || true
# no v8pp anymore: cp -prv v8pp/v8pp out/opt/cppse/build/v8pp/include/
echo no-op


fpm_package: fpm_package:
docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.04 fpm -v $(VERSION) -s dir -t deb -n cppse-v8 --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "v8pp - build dependency" --url "https://github.com/rayburgemeestre/v8pp" --deb-generate-changes -C /src/out
docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.04 fpm -v $(VERSION) -s dir -t deb -n cppse-v8 --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "v8 - build dependency" --url "https://github.com/rayburgemeestre/v8pp" --deb-generate-changes -C /src/out


clean: clean:
rm -rf v8pp rm -rf v8pp

+ 26
- 6
v8pp/build-v8.sh View File

#!/bin/bash #!/bin/bash


set -ex

# I guess now we have to install ninja ourselves.. sigh.. # I guess now we have to install ninja ourselves.. sigh..
git clone https://github.com/ninja-build/ninja.git
git clone https://github.com/ninja-build/ninja.git || true
pushd ninja pushd ninja
git checkout v1.11.1 git checkout v1.11.1


apt-get install python3-pip -y apt-get install python3-pip -y
pip3 install httplib2 --upgrade --break-system-packages pip3 install httplib2 --upgrade --break-system-packages


fetch v8
fetch v8 # || gclient sync

# fetch v8 || gclient sync


cd v8 # if this fails, exit! hence the set -ex cd v8 # if this fails, exit! hence the set -ex


#gclient sync -r 7.2.1 # stupid test #gclient sync -r 7.2.1 # stupid test
#gclient sync -r 8.2.297.1 # https://github.com/pmed/v8-nuget/ #gclient sync -r 8.2.297.1 # https://github.com/pmed/v8-nuget/
#gclient sync -r 9.3.345.3 # https://github.com/pmed/v8-nuget/ #gclient sync -r 9.3.345.3 # https://github.com/pmed/v8-nuget/
#gclient sync -r 10.0.139.9 # https://github.com/pmed/v8-nuget/
gclient sync -r 10.0.139.9 # https://github.com/pmed/v8-nuget/
#gclient sync -r 11.9.169.4 # https://github.com/pmed/v8-nuget/ #gclient sync -r 11.9.169.4 # https://github.com/pmed/v8-nuget/
gclient sync -r 13.0.245.25
#gclient sync -r 13.0.245.25


# N/m couldn't get this to work, let's just not build inside docker for v8
# # patch for a bug w/r/t uids on files
# # # see: https://superuser.com/a/1435438
# #
# #e.g.
# #
# #tar: ./usr/lib: Cannot change ownership to uid 376730, gid 89939: Invalid argument
# #tar: ./usr/bin: Cannot change ownership to uid 376730, gid 89939: Invalid argument
# #...
# # subprocess.CalledProcessError: Command '['tar', 'mxf', '/home/trigen/projects/build-config/v8pp/v8/build/linux/debian_bullseye_i386-sysroot/debian_bullseye_i386_sysroot.tar.xz', '-C', '/home/trigen/projects/build-config/v8pp/v8/build/linux/debian_bullseye_i386-sysroot']' returned non-zero exit status 2.
# #
# file="./v8/build/linux/sysroot_scripts/install-sysroot.py"
# old_string="mxf"
# new_string="mxf', '--no-same-owner"
# sed -i "s/${old_string}/${new_string}/g" "$file"
# echo $?




# Looks like we have to use GN now: https://github.com/v8/v8/wiki/Building-with-GN # Looks like we have to use GN now: https://github.com/v8/v8/wiki/Building-with-GN



Loading…
Cancel
Save