From d7da9e8d5d3bfe596b62a5ce165871bf2b200007 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Tue, 23 Jan 2024 15:57:51 +0100 Subject: [PATCH] CI: specify cosmocc version --- .github/build.sh | 26 +++++++++----------------- .github/workflows/ubuntu.yml | 4 ++-- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/build.sh b/.github/build.sh index cd645b3..0fafba1 100755 --- a/.github/build.sh +++ b/.github/build.sh @@ -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 - ;; @@ -61,11 +56,7 @@ 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 ;; macos) ./configure @@ -87,11 +78,12 @@ esac case "$1" in ape) - mkdir -p openpace_ape - for file in openssl/apps/openssl src/eactest src/cvc-create src/cvc-print + mkdir -p openpace-bin + 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-bin/${file##*/}.com + cp $file openpace-bin/${file##*/}.com done - cp -r docs openpace_ape + cp -r docs openpace-bin ;; esac diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index e76c2bb..8cdc6b9 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -35,6 +35,6 @@ jobs: - run: .github/build.sh ape - uses: actions/upload-artifact@v2 with: - name: openpace-ape + name: openpace-bin path: - openpace_ape + openpace-bin