Skip to content

Commit

Permalink
CI: specify cosmocc version
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmorgner committed Mar 11, 2024
1 parent 20e59ce commit 3cd50f3
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions .github/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,12 @@ case "$1" in
sudo sh -c "echo ':APE:M::MZqFpD::/bin/sh:' >/proc/sys/fs/binfmt_misc/register"
sudo mkdir -p /opt
sudo chmod 1777 /opt
test -d /opt/cosmo || git clone https://github.com/jart/cosmopolitan /opt/cosmo
cd /opt/cosmo
make toolchain 2>/dev/null
mkdir -p /opt/cosmos/bin
/opt/cosmo/bin/cosmocc --update
cd -
test -d /opt/cosmo || (wget https://cosmo.zip/pub/cosmocc/cosmocc-3.3.1.zip && sudo unzip cosmocc-3.3.1.zip -d /opt/cosmo)
test -d openssl || git clone --depth=1 https://github.com/openssl/openssl.git -b openssl-3.0 openssl
# see also https://github.com/ahgamut/superconfigure/blob/main/lib/openssl/BUILD.mk
cd openssl
git apply ../.github/openssl_getrandom.diff
./config --with-rand-seed=getrandom no-asm no-shared no-dso no-engine no-dynamic-engine -DPURIFY CC=/opt/cosmo/bin/cosmocc
find /opt/cosmo/tool/scripts/
./Configure linux-aarch64 --with-rand-seed=getrandom no-asm no-shared no-dso no-engine no-dynamic-engine no-pic no-autoalginit no-autoerrinit no-tests -DPURIFY CC="/opt/cosmo/bin/cosmocc -I/opt/cosmo/include -L/opt/cosmo/lib" AR=/opt/cosmo/bin/cosmoar
make
cd -
;;
Expand All @@ -61,11 +56,11 @@ case "$1" in
./configure --enable-python --enable-java --enable-ruby --enable-go
;;
ape)
./configure CC=/opt/cosmo/bin/cosmocc CRYPTO_CFLAGS="-I$PWD/openssl/include" CRYPTO_LIBS="-L$PWD/openssl -lcrypto" --disable-shared
echo "#define ossl_unused" >> config.h
echo "#define ossl_inline" >> config.h
echo "#define __owur" >> config.h
echo "#define ossl_noreturn" >> config.h
./configure CC=/opt/cosmo/bin/cosmocc INSTALL="/opt/cosmo/bin/cosmoinstall" AR="/opt/cosmo/bin/cosmoar" CRYPTO_CFLAGS="-I$PWD/openssl/include" CRYPTO_LIBS="-L$PWD/openssl -lcrypto" --disable-shared
#echo "#define ossl_unused" >> config.h
#echo "#define ossl_inline" >> config.h
#echo "#define __owur" >> config.h
#echo "#define ossl_noreturn" >> config.h
;;
macos)
./configure
Expand All @@ -88,9 +83,11 @@ esac
case "$1" in
ape)
mkdir -p openpace_ape
for file in openssl/apps/openssl src/eactest src/cvc-create src/cvc-print
find .
for file in src/eactest src/cvc-create src/cvc-print
do
objcopy -SO binary $file openpace_ape/${file##*/}.com
#objcopy -SO binary $file openpace_ape/${file##*/}.com
cp $file openpace_ape/${file##*/}.com
done
cp -r docs openpace_ape
;;
Expand Down

0 comments on commit 3cd50f3

Please sign in to comment.