Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable RISC-V #5215

Merged
merged 6 commits into from
Nov 5, 2024
Merged
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
149 changes: 74 additions & 75 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -573,74 +573,73 @@ jobs:
if-no-files-found: error
retention-days: 2

# linux_riscv64:
# name: Linux riscv64
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: dtolnay/rust-toolchain@stable
# with:
# target: riscv64gc-unknown-linux-gnu
# - name: Build cross image
# run: |
# docker build -t wasmer/riscv64 ${GITHUB_WORKSPACE}/.github/cross-linux-riscv64/
# env:
# CROSS_DOCKER_IN_DOCKER: true
# - name: Build Wasmer binary
# run: |
# make build-wasmer
# env:
# CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project wasmer/riscv64:latest cargo
# CROSS_DOCKER_IN_DOCKER: true
# CARGO_TARGET: riscv64gc-unknown-linux-gnu
# PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig
# PKG_CONFIG_ALLOW_CROSS: true
# ENABLE_LLVM: 0
# - name: Build C API headless
# shell: bash
# run: |
# make package-capi-headless
# env:
# CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project wasmer/riscv64:latest cargo
# CROSS_DOCKER_IN_DOCKER: true
# CARGO_TARGET: riscv64gc-unknown-linux-gnu
# PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig
# PKG_CONFIG_ALLOW_CROSS: true
# ENABLE_LLVM: 0
# TARGET: riscv64gc-unknown-linux-gnu
# TARGET_DIR: target/riscv64gc-unknown-linux-gnu/release
# - name: Build C API
# run: |
# make build-capi
# env:
# CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project wasmer/riscv64:latest cargo
# CROSS_DOCKER_IN_DOCKER: true
# CARGO_TARGET: riscv64gc-unknown-linux-gnu
# PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig
# PKG_CONFIG_ALLOW_CROSS: true
# ENABLE_LLVM: 0
# - name: Dist
# run: |
# make distribution
# env:
# CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project wasmer/riscv64:latest cargo
# CROSS_DOCKER_IN_DOCKER: true
# CARGO_TARGET: riscv64gc-unknown-linux-gnu
# PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig
# PKG_CONFIG_ALLOW_CROSS: true
# TARGET: riscv64gc-unknown-linux-gnu
# TARGET_DIR: target/riscv64gc-unknown-linux-gnu/release
# - name: Upload Artifacts
# uses: actions/upload-artifact@v4
# with:
# name: wasmer-linux-riscv64
# path: dist
# if-no-files-found: error
# retention-days: 2
linux_riscv64:
name: Linux riscv64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
target: riscv64gc-unknown-linux-gnu
- name: Build cross image
run: |
docker build -t wasmer/riscv64 ${GITHUB_WORKSPACE}/.github/cross-linux-riscv64/
env:
CROSS_DOCKER_IN_DOCKER: true
- name: Build Wasmer binary
run: |
make build-wasmer
env:
CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project wasmer/riscv64:latest cargo
CROSS_DOCKER_IN_DOCKER: true
CARGO_TARGET: riscv64gc-unknown-linux-gnu
PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig
PKG_CONFIG_ALLOW_CROSS: true
ENABLE_LLVM: 0
- name: Build C API headless
shell: bash
run: |
make package-capi-headless
env:
CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project wasmer/riscv64:latest cargo
CROSS_DOCKER_IN_DOCKER: true
CARGO_TARGET: riscv64gc-unknown-linux-gnu
PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig
PKG_CONFIG_ALLOW_CROSS: true
ENABLE_LLVM: 0
TARGET: riscv64gc-unknown-linux-gnu
TARGET_DIR: target/riscv64gc-unknown-linux-gnu/release
- name: Build C API
run: |
make build-capi
env:
CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project wasmer/riscv64:latest cargo
CROSS_DOCKER_IN_DOCKER: true
CARGO_TARGET: riscv64gc-unknown-linux-gnu
PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig
PKG_CONFIG_ALLOW_CROSS: true
ENABLE_LLVM: 0
- name: Dist
run: |
make distribution
env:
CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project wasmer/riscv64:latest cargo
CROSS_DOCKER_IN_DOCKER: true
CARGO_TARGET: riscv64gc-unknown-linux-gnu
PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig
PKG_CONFIG_ALLOW_CROSS: true
TARGET: riscv64gc-unknown-linux-gnu
TARGET_DIR: target/riscv64gc-unknown-linux-gnu/release
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: wasmer-linux-riscv64
path: dist
if-no-files-found: error
retention-days: 2

release:
# needs: [setup, build, linux_aarch64, windows_gnu, linux_riscv64]
needs: [setup, build, windows_gnu]
needs: [setup, build, windows_gnu, linux_riscv64]
runs-on: ubuntu-latest
if: needs.setup.outputs.DOING_RELEASE == '1' || github.event.inputs.release != ''
steps:
Expand Down Expand Up @@ -748,15 +747,15 @@ jobs:
asset_path: artifacts/wasmer-linux-aarch64/wasmer.tar.gz
asset_name: wasmer-linux-aarch64.tar.gz
asset_content_type: application/gzip
# - name: Upload Release Asset Linux riscv64
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: artifacts/wasmer-linux-riscv64/wasmer.tar.gz
# asset_name: wasmer-linux-riscv64.tar.gz
# asset_content_type: application/gzip
- name: Upload Release Asset Linux riscv64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/wasmer-linux-riscv64/wasmer.tar.gz
asset_name: wasmer-linux-riscv64.tar.gz
asset_content_type: application/gzip
- name: Upload Release Asset Windows gnu64
uses: actions/upload-release-asset@v1
env:
Expand Down
Loading