From 69d848c37da88a6047acac0fa9c1b23aefc47af9 Mon Sep 17 00:00:00 2001 From: Gavin Hayes Date: Tue, 23 Jan 2024 21:09:30 -0500 Subject: [PATCH] fix/ci: adapt to cosmocc changes, only use x86_64 cosmo for now (#31) * fix: adapt to cosmocc changesm, only use x86_64 cosmo for now * ci: update to new cosmocc install * ci: debug ubuntu * ci: ubuntu, use executable ape loader --- .github/workflows/ci.yml | 25 +++++++++++++------------ build_hermit.sh | 4 ++-- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8444753..5b4187b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,12 +15,15 @@ jobs: submodules: recursive - name: Setup cosmocc run: | - sudo mkdir -p /opt - sudo chmod 1777 /opt - git clone https://github.com/jart/cosmopolitan.git /opt/cosmo - export PATH="/opt/cosmo/bin:/opt/cosmos/bin:$PATH" - ape-install - cosmocc --update + sudo mkdir -p /opt/cosmocc + cd /opt/cosmocc + sudo wget https://cosmo.zip/pub/cosmocc/cosmocc.zip + sudo unzip cosmocc.zip + export PATH="/opt/cosmocc/bin:$PATH" + - name: Install ape loader + run: | + sudo cp /opt/cosmocc/bin/ape-$(uname -m).elf /usr/bin/ape + sudo sh -c "echo ':APE:M::MZqFpD::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register" - name: Install deps run: | curl https://wasmtime.dev/install.sh -sSf | bash @@ -29,7 +32,7 @@ jobs: cargo build --package pest_bootstrap - name: Build APEs run: | - export PATH="/opt/cosmo/bin:/opt/cosmos/bin:$PATH" + export PATH="/opt/cosmocc/bin:$PATH" cosmocc --version export WASMTIME_HOME="$HOME/.wasmtime" export PATH="$WASMTIME_HOME/bin:$PATH" @@ -57,11 +60,9 @@ jobs: if: ${{ matrix.os == 'ubuntu-latest' }} shell: bash run: | - sudo mkdir -p /opt - sudo chmod 1777 /opt - git clone https://github.com/jart/cosmopolitan.git /opt/cosmo - export PATH="/opt/cosmo/bin:/opt/cosmos/bin:$PATH" - ape-install + sudo wget -O /usr/bin/ape https://cosmo.zip/pub/cosmos/bin/ape-$(uname -m).elf + sudo chmod +x /usr/bin/ape + sudo sh -c "echo ':APE:M::MZqFpD::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register" - name: Download APEs uses: actions/download-artifact@v3 - name: Test APEs (no output on NT?) diff --git a/build_hermit.sh b/build_hermit.sh index 3b9ad5e..7ae06fe 100755 --- a/build_hermit.sh +++ b/build_hermit.sh @@ -1,6 +1,6 @@ #!/bin/sh -export CC=cosmocc -export CXX=cosmoc++ +export CC=x86_64-unknown-cosmo-cc +export CXX=x86_64-unknown-cosmo-c++ rm -rf build hermit-cli/build hermit-cli/target mkdir build cmake -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_INTERP=1 -B build