Skip to content

Commit

Permalink
fix/ci: adapt to cosmocc changes, only use x86_64 cosmo for now (#31)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
G4Vi authored Jan 24, 2024
1 parent 267ba40 commit 69d848c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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?)
Expand Down
4 changes: 2 additions & 2 deletions build_hermit.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 69d848c

Please sign in to comment.