Skip to content

Commit

Permalink
re-enable RISC-V (#5215)
Browse files Browse the repository at this point in the history
  • Loading branch information
maminrayej authored Nov 5, 2024
2 parents af6f650 + f082b7c commit ccb13b2
Showing 1 changed file with 74 additions and 75 deletions.
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

0 comments on commit ccb13b2

Please sign in to comment.