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

fix!: placement of python dependencies on disk #17

Merged
merged 8 commits into from
Oct 23, 2024
Merged
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
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: default
toolchain: stable
toolchain: 1.81.0
target: wasm32-wasi
default: true

Expand All @@ -36,10 +36,10 @@ jobs:
go install github.com/extism/cli/extism@v1.5.4
cd /tmp
# get just wasm-merge and wasm-opt
curl -L https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-x86_64-linux.tar.gz > binaryen.tar.gz
curl -L https://github.com/WebAssembly/binaryen/releases/download/version_117/binaryen-version_117-x86_64-linux.tar.gz > binaryen.tar.gz
tar xvzf binaryen.tar.gz
sudo cp binaryen-version_116/bin/wasm-merge /usr/local/bin
sudo cp binaryen-version_116/bin/wasm-opt /usr/local/bin
sudo cp binaryen-version_117/bin/wasm-merge /usr/local/bin
sudo cp binaryen-version_117/bin/wasm-opt /usr/local/bin
if: runner.os != 'Windows'

- name: Update deps (Windows)
Expand All @@ -48,11 +48,11 @@ jobs:
go install github.com/extism/cli/extism@c1eb1fc
Remove-Item -Recurse -Path "c:\Program files\Binaryen" -Force -ErrorAction SilentlyContinue > $null 2>&1
New-Item -ItemType Directory -Force -Path "c:\Program files\Binaryen" -ErrorAction Stop > $null 2>&1
Invoke-WebRequest -Uri "https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_116-x86_64-windows.tar.gz" -OutFile "$env:TMP\binaryen-version_116-x86_64-windows.tar.gz"
7z x "$env:TMP\binaryen-version_116-x86_64-windows.tar.gz" -o"$env:TMP\" >$null 2>&1
7z x -ttar "$env:TMP\binaryen-version_116-x86_64-windows.tar" -o"$env:TMP\" >$null 2>&1
Copy-Item -Path "$env:TMP\binaryen-version_116\bin\wasm-opt.exe" -Destination "c:\Program files\Binaryen" -ErrorAction Stop > $null 2>&1
Copy-Item -Path "$env:TMP\binaryen-version_116\bin\wasm-merge.exe" -Destination "c:\Program files\Binaryen" -ErrorAction Stop > $null 2>&1
Invoke-WebRequest -Uri "https://github.com/WebAssembly/binaryen/releases/download/version_116/binaryen-version_117-x86_64-windows.tar.gz" -OutFile "$env:TMP\binaryen-version_116-x86_64-windows.tar.gz"
7z x "$env:TMP\binaryen-version_117-x86_64-windows.tar.gz" -o"$env:TMP\" >$null 2>&1
7z x -ttar "$env:TMP\binaryen-version_117-x86_64-windows.tar" -o"$env:TMP\" >$null 2>&1
Copy-Item -Path "$env:TMP\binaryen-version_117\bin\wasm-opt.exe" -Destination "c:\Program files\Binaryen" -ErrorAction Stop > $null 2>&1
Copy-Item -Path "$env:TMP\binaryen-version_117\bin\wasm-merge.exe" -Destination "c:\Program files\Binaryen" -ErrorAction Stop > $null 2>&1
if: runner.os == 'Windows'

- name: Run Tests (Linux)
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ jobs:
- name: Test Install Script
run: |
bash ./install.sh
if: runner.os != 'Windows'

- name: Test Installation
run: |
which extism-py
extism-py --version
if: runner.os != 'Windows'


# - name: Test Install Script Part1 (Windows)
# run: |
# powershell -executionpolicy bypass -File .\install-windows.ps1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: default
toolchain: stable
toolchain: 1.81.0
target: wasm32-wasi
default: true

Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
run: cd bin && cargo build --release --target ${{ matrix.target }} --package extism-py

- name: Create directory structure
run: mkdir -p extism-py/bin extism-py/share && mv wasi-deps/usr extism-py/share/extism-py && mv ${{ matrix.path }} extism-py/bin/
run: mkdir -p extism-py/bin extism-py/share && mv wasi-deps extism-py/share/extism-py && mv ${{ matrix.path }} extism-py/bin/

- name: Archive assets
run: tar czf ${{ matrix.asset_name }}.tar.gz extism-py
Expand Down
Loading
Loading