Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 43 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ jobs:
rustup install --target x86_64-unknown-linux-gnu,x86_64-unknown-linux-musl ${{ env.RUST_VERSION }}
rustup default ${{ env.RUST_VERSION }}-x86_64-unknown-linux-gnu
rustup component add rust-src
- name: Set COREVM_HOME
run: echo "COREVM_HOME=$PWD" >>"$GITHUB_ENV"
- name: Check that setup script works
run: ./setup.sh
- name: Check that sysroot is reproducible
Expand All @@ -57,7 +59,9 @@ jobs:
./setup.sh
./ci/check-reproducible.sh sysroot.old sysroot
- name: Check that our tools work
run: ./ci/apps.sh
run: |
. "$COREVM_HOME"/env
./ci/apps.sh
- name: Create distribution archive
run: ./ci/dist.sh
- name: Upload archives as artifacts
Expand Down Expand Up @@ -86,10 +90,14 @@ jobs:
rustup install ${{ env.RUST_VERSION }}
rustup default ${{ env.RUST_VERSION }}
rustup component add rust-src
- name: Set COREVM_HOME
run: echo "COREVM_HOME=$PWD" >>"$GITHUB_ENV"
- name: Check that setup script works
run: ./setup.sh
- name: Check that our tools work
run: ./ci/apps.sh
run: |
. "$COREVM_HOME"/env
./ci/apps.sh
- name: Create distribution archive
run: ./ci/dist.sh
- name: Upload archives as artifacts
Expand All @@ -101,44 +109,55 @@ jobs:
if-no-files-found: error
retention-days: 1

check-macos:
name: Check that sysroot produced on Linux works on MacOS
check-corevm-dist:
name: Check that corevm-dist works on ${{ matrix.cfg.runs-on }}
runs-on: ${{ matrix.cfg.runs-on }}
timeout-minutes: 20
runs-on: macos-15
needs: [setup-linux, setup-macos]
strategy:
matrix:
cfg:
- runs-on: ubuntu-24.04
os: ubuntu
- runs-on: macos-15
os: macos
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: ./ci/apt.sh
if: ${{ matrix.cfg.os == 'ubuntu' }}
- name: Install dependencies
run: ./ci/brew.sh
if: ${{ matrix.cfg.os == 'macos' }}
- name: Install Rust toolchain
run: |
rustup install ${{ env.RUST_VERSION }}
rustup default ${{ env.RUST_VERSION }}
rustup component add rust-src
- name: Download Linux sysroot
- name: Download Linux archives
uses: actions/download-artifact@v5
with:
name: linux-archives
- name: Download MacOS archives
uses: actions/download-artifact@v5
with:
name: macos-archives
- name: Unpack Linux sysroot and MacOS tools
run: |
ls -l
mkdir -p sysroot/bin
tar -C sysroot -xf sysroot-Linux-riscv64emac.tar.zst
tar -C sysroot/bin -xf tools-Darwin-arm64.tar.zst
- name: Check archive hashes
run: ./ci/check-b2sum.sh
- name: Install sysroot and tools via corevm-dist
run: ./ci/install-via-corevm-dist.sh
- name: Build apps
run: ./ci/apps.sh
run: |
. $HOME/.corevm/env
./ci/apps.sh

create-release:
name: Create binary release
timeout-minutes: 20
runs-on: ubuntu-24.04
needs: [check-macos]
needs: [rust, check-corevm-dist]
if: github.ref_type == 'tag'
permissions:
contents: write
Expand All @@ -153,12 +172,10 @@ jobs:
uses: actions/download-artifact@v5
with:
name: macos-archives
- name: Rename archives
run: |
ls -l
mv sysroot-Linux-riscv64emac.tar.zst sysroot-${{ env.VERSION }}-Linux-riscv64emac.tar.zst
mv tools-Linux-x86_64.tar.zst tools-${{ env.VERSION }}-Linux-x86_64.tar.zst
mv tools-Darwin-arm64.tar.zst tools-${{ env.VERSION }}-Darwin-arm64.tar.zst
- name: Check archive hashes
run: ./ci/check-b2sum.sh
- name: Check corevm-dist version
run: ./ci/check-version.sh
- name: Create release
uses: actions/create-release@v1
id: create_release
Expand All @@ -175,24 +192,24 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: sysroot-${{ env.VERSION }}-Linux-riscv64emac.tar.zst
asset_name: sysroot-${{ env.VERSION }}-Linux-riscv64emac.tar.zst
asset_path: sysroot-Linux-riscv64emac.tar.zst
asset_name: sysroot-Linux-riscv64emac.tar.zst
asset_content_type: application/zstd
- name: Upload tools-Linux-x86_64.tar.zst
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: tools-${{ env.VERSION }}-Linux-x86_64.tar.zst
asset_name: tools-${{ env.VERSION }}-Linux-x86_64.tar.zst
asset_path: tools-Linux-x86_64.tar.zst
asset_name: tools-Linux-x86_64.tar.zst
asset_content_type: application/zstd
- name: Upload tools-Darwin-arm64.tar.zst
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: tools-${{ env.VERSION }}-Darwin-arm64.tar.zst
asset_name: tools-${{ env.VERSION }}-Darwin-arm64.tar.zst
asset_path: tools-Darwin-arm64.tar.zst
asset_name: tools-Darwin-arm64.tar.zst
asset_content_type: application/zstd
Loading
Loading