From e3bd793f439d8e0aac9cc049f8972ba37bcbb2a2 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 15 Aug 2021 09:49:56 +0300 Subject: [PATCH] ci: add a script to install tcc from source on freebsd so it can be run the freebsd job --- .cirrus.yml | 5 +++-- .github/workflows/freebsd_build_tcc.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100755 .github/workflows/freebsd_build_tcc.sh diff --git a/.cirrus.yml b/.cirrus.yml index 099c7c2870..0f6e8a37ea 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -2,12 +2,13 @@ freebsd_instance: image_family: freebsd-13-0 task: - install_script: pkg install -y git tcc + install_script: pkg install -y git tcc bash script: | echo 'Building V' git clone https://github.com/vlang/v cd v make - tcc --version + ## .github/workflows/freebsd_build_tcc.sh + tcc -v -v echo 'Build cmd/tools/fast' cd cmd/tools/fast && ../../../v fast.v && ./fast diff --git a/.github/workflows/freebsd_build_tcc.sh b/.github/workflows/freebsd_build_tcc.sh new file mode 100755 index 0000000000..6b8578bfe0 --- /dev/null +++ b/.github/workflows/freebsd_build_tcc.sh @@ -0,0 +1,26 @@ +#!/usr/local/bin/bash + +## should be run in V's main repo folder! + +rm -rf tinycc/ +rm -rf thirdparty/tcc/ + +pushd . + +git clone git://repo.or.cz/tinycc.git +cd tinycc + +./configure --prefix=thirdparty/tcc \ + --bindir=thirdparty/tcc \ + --crtprefix=thirdparty/tcc/lib:/usr/lib \ + --libpaths=thirdparty/tcc/lib:/usr/lib:/lib:/usr/local/lib \ + --debug +make +make install + +popd + +mv tinycc/thirdparty/tcc thirdparty/tcc +mv thirdparty/tcc/tcc thirdparty/tcc/tcc.exe + +thirdparty/tcc/tcc.exe -v -v