Skip to content

Commit

Permalink
Merge pull request wasmerio#3430 from wasmerio/multi-command-exe
Browse files Browse the repository at this point in the history
Implement support for multiple commands in one native executable
  • Loading branch information
syrusakbary authored Jan 5, 2023
2 parents 256a97e + d516713 commit 494e2ea
Show file tree
Hide file tree
Showing 34 changed files with 3,045 additions and 2,156 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ jobs:
env:
CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project wasmer/aarch64 cross
CROSS_DOCKER_IN_DOCKER: true
CARGO_TARGET: --target aarch64-unknown-linux-gnu
CARGO_TARGET: aarch64-unknown-linux-gnu
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
PKG_CONFIG_ALLOW_CROSS: true
ENABLE_LLVM: 0
Expand All @@ -344,7 +344,7 @@ jobs:
env:
CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project wasmer/aarch64 cross
CROSS_DOCKER_IN_DOCKER: true
CARGO_TARGET: --target aarch64-unknown-linux-gnu
CARGO_TARGET: aarch64-unknown-linux-gnu
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
PKG_CONFIG_ALLOW_CROSS: true
ENABLE_LLVM: 0
Expand All @@ -356,7 +356,7 @@ jobs:
env:
CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project wasmer/aarch64 cross
CROSS_DOCKER_IN_DOCKER: true
CARGO_TARGET: --target aarch64-unknown-linux-gnu
CARGO_TARGET: aarch64-unknown-linux-gnu
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
PKG_CONFIG_ALLOW_CROSS: true
ENABLE_LLVM: 0
Expand All @@ -366,7 +366,7 @@ jobs:
env:
CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project wasmer/aarch64 cross
CROSS_DOCKER_IN_DOCKER: true
CARGO_TARGET: --target aarch64-unknown-linux-gnu
CARGO_TARGET: aarch64-unknown-linux-gnu
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
PKG_CONFIG_ALLOW_CROSS: true
TARGET: aarch64-unknown-linux-gnu
Expand Down
48 changes: 14 additions & 34 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
env:
CARGO_BINARY: docker run -v /var/run/docker.sock:/var/run/docker.sock -v ${GITHUB_WORKSPACE}:/project -w /project wasmer/aarch64 cross
CROSS_DOCKER_IN_DOCKER: true
CARGO_TARGET: --target aarch64-unknown-linux-gnu
CARGO_TARGET: aarch64-unknown-linux-gnu
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
PKG_CONFIG_ALLOW_CROSS: true
ENABLE_LLVM: 0
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
build: windows-x64,
os: windows-2019,
target: x86_64-pc-windows-msvc,
llvm_choco_version: 13.0.0
llvm_url: 'https://github.com/wasmerio/llvm-custom-builds/releases/download/13.x/llvm-windows-amd64.tar.xz'
},
{
build: windows-gnu,
Expand All @@ -223,7 +223,7 @@ jobs:
if: matrix.metadata.build == 'linux-x64'
run: |
sudo apt-get update -y
sudo apt-get install -y --allow-downgrades libstdc++6
sudo apt-get install -y --allow-downgrades libstdc++6 libtinfo5
sudo apt-get install --reinstall g++
- name: Set up base deps on musl
if: matrix.metadata.build == 'linux-musl'
Expand Down Expand Up @@ -273,18 +273,6 @@ jobs:
mkdir -p package
mkdir -p package/winsdk
cp -r /tmp/winsdk/* package/winsdk
- name: Choco install LLVM
uses: crazy-max/ghaction-chocolatey@v2
if: matrix.metadata.llvm_choco_version
with:
args: install llvm --version ${{ matrix.metadata.llvm_choco_version }} --allow-downgrade
- name: Install LLVM (Choco - Windows)
if: matrix.metadata.llvm_choco_version
shell: bash
run: |
cd 'C:\Program Files\LLVM\'
LLVM_DIR=$(pwd)
echo "LLVM_SYS_120_PREFIX=${LLVM_DIR}" >> $GITHUB_ENV
- name: Install LLVM (macOS Apple Silicon)
if: matrix.metadata.os == 'macos-11.0' && !matrix.metadata.llvm_url
run: |
Expand All @@ -297,6 +285,7 @@ jobs:
LLVM_DIR=$(pwd)/${{ env.LLVM_DIR }}
mkdir ${LLVM_DIR}
tar xf llvm.tar.xz --strip-components=1 -C ${LLVM_DIR}
echo "ENABLE_LLVM=1" >> $GITHUB_ENV
echo "${LLVM_DIR}/bin" >> $GITHUB_PATH
echo "LLVM_SYS_120_PREFIX=${LLVM_DIR}" >> $GITHUB_ENV
env:
Expand Down Expand Up @@ -341,23 +330,23 @@ jobs:
env:
TARGET: ${{ matrix.metadata.target }}
TARGET_DIR: target/${{ matrix.metadata.target }}/release
CARGO_TARGET: --target ${{ matrix.metadata.target }}
CARGO_TARGET: ${{ matrix.metadata.target }}
- name: Build Wasmer
shell: bash
if: ${{ matrix.build-what.key == 'wasmer' && matrix.metadata.build != 'windows-gnu' }}
run: ${{ matrix.build-what.build-cmd }}
env:
TARGET: ${{ matrix.metadata.target }}
TARGET_DIR: target/${{ matrix.metadata.target }}/release
CARGO_TARGET: --target ${{ matrix.metadata.target }}
CARGO_TARGET: ${{ matrix.metadata.target }}
- name: Test C-API
shell: bash
if: ${{ matrix.build-what.key == 'capi' && !(matrix.metadata.build == 'linux-musl' || matrix.metadata.build == 'macos-arm' || matrix.metadata.build == 'windows-gnu') }}
run: make test-capi-ci
env:
TARGET: ${{ matrix.metadata.target }}
TARGET_DIR: target/${{ matrix.metadata.target }}/release
CARGO_TARGET: --target ${{ matrix.metadata.target }}
CARGO_TARGET: ${{ matrix.metadata.target }}
# C-API tests were disabled for linux-musl and macos-arm (we can't run them)
- name: Test C-API integration
shell: bash
Expand All @@ -366,7 +355,7 @@ jobs:
env:
TARGET: ${{ matrix.metadata.target }}
TARGET_DIR: target/${{ matrix.metadata.target }}/release
CARGO_TARGET: --target ${{ matrix.metadata.target }}
CARGO_TARGET: ${{ matrix.metadata.target }}
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -433,7 +422,7 @@ jobs:
build: windows-x64,
os: windows-2019,
target: x86_64-pc-windows-msvc,
llvm_choco_version: 13.0.0
llvm_url: 'https://github.com/wasmerio/llvm-custom-builds/releases/download/13.x/llvm-windows-amd64.tar.xz'
},
{
build: linux-musl,
Expand Down Expand Up @@ -470,18 +459,6 @@ jobs:
with:
toolchain: 1.63
target: ${{ matrix.metadata.target }}
- name: Choco install LLVM
uses: crazy-max/ghaction-chocolatey@v2
if: matrix.metadata.llvm_choco_version
with:
args: install llvm --version ${{ matrix.metadata.llvm_choco_version }} --allow-downgrade
- name: Install LLVM (Choco - Windows)
if: matrix.metadata.llvm_choco_version
shell: bash
run: |
cd 'C:\Program Files\LLVM\'
LLVM_DIR=$(pwd)
echo "LLVM_SYS_120_PREFIX=${LLVM_DIR}" >> $GITHUB_ENV
- name: Install LLVM (macOS Apple Silicon)
if: matrix.metadata.os == 'macos-11.0' && !matrix.metadata.llvm_url
run: |
Expand Down Expand Up @@ -526,7 +503,7 @@ jobs:
env:
TARGET: ${{ matrix.metadata.target }}
TARGET_DIR: target/${{ matrix.metadata.target }}/release
CARGO_TARGET: --target ${{ matrix.metadata.target }}
CARGO_TARGET: ${{ matrix.metadata.target }}

test_integration_cli:
name: CLI integration tests on ${{ matrix.build }}
Expand All @@ -552,6 +529,9 @@ jobs:
target: x86_64-unknown-linux-musl
os: ubuntu-22.04
container: alpine:latest
- build: windows-x64
os: windows-2019
target: x86_64-pc-windows-msvc
container: ${{ matrix.container }}
env:
SCCACHE_AZURE_BLOB_CONTAINER: wasmerstoragesccacheblob
Expand Down Expand Up @@ -608,6 +588,6 @@ jobs:
env:
TARGET: ${{ matrix.target }}
TARGET_DIR: target/${{ matrix.target }}/release
CARGO_TARGET: --target ${{ matrix.target }}
CARGO_TARGET: ${{ matrix.target }}
WAPM_DEV_TOKEN: ${{ secrets.WAPM_DEV_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 494e2ea

Please sign in to comment.