Skip to content

Commit 8cef08e

Browse files
committed
chore: Add rust dependencies to gh-actions
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
1 parent aafecab commit 8cef08e

5 files changed

Lines changed: 46 additions & 7 deletions

File tree

.github/workflows/macos.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,20 @@ jobs:
3737

3838
- uses: actions/cache@v3
3939
with:
40-
path: "build/vcpkg_installed/**/*"
41-
key: ${{ matrix.os }}-vcpkg_installed
40+
key: ${{ matrix.os }}-packages
41+
path: |
42+
"build/vcpkg_installed/**/*"
43+
~/.cargo/registry
44+
~/.cargo/git
4245
4346
- name: install dependencies
4447
run: |
4548
brew install pkg-config autoconf autoconf-archive automake coreutils libtool cmake ninja
4649
50+
- name: Install rust dependencies
51+
run: |
52+
cargo install wasm-tools wit-bindgen-cli
53+
4754
- name: configure
4855
run: |
4956
cmake --preset linux-ninja-Debug

.github/workflows/ubuntu.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@ jobs:
3030
submodules: recursive
3131

3232
- uses: actions/cache@v3
33+
if: always()
3334
with:
34-
path: "build/vcpkg_installed/**/*"
35-
key: ${{ matrix.os }}-vcpkg_installed
35+
key: ${{ matrix.os }}-packages
36+
path: |
37+
"build/vcpkg_installed/**/*"
38+
~/.cargo/registry
39+
~/.cargo/git
3640
3741
- name: install dependencies
3842
run: |
@@ -43,6 +47,10 @@ jobs:
4347
build-essential \
4448
ninja-build
4549
50+
- name: Install rust dependencies
51+
run: |
52+
cargo install wasm-tools wit-bindgen-cli
53+
4654
- name: configure
4755
run: |
4856
cmake --preset linux-ninja-Debug

.github/workflows/windows.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,17 @@ jobs:
3131
submodules: recursive
3232

3333
- uses: actions/cache@v3
34+
if: always()
3435
with:
35-
path: "build/vcpkg_installed/**/*"
36-
key: ${{ matrix.os }}-vcpkg_installed
36+
key: ${{ matrix.os }}-packages
37+
path: |
38+
"build/vcpkg_installed/**/*"
39+
~/.cargo/registry
40+
~/.cargo/git
41+
42+
- name: Install rust dependencies
43+
run: |
44+
cargo install wasm-tools wit-bindgen-cli
3745
3846
- name: configure
3947
run: |

vcpkg_overlays/wasi-sdk/portfile.cmake

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
1+
# https://github.com/WebAssembly/wasi-sdk/releases
2+
3+
if(APPLE)
4+
vcpkg_download_distfile(ARCHIVE
5+
URLS "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-${VERSION}-arm64-macos.tar.gz"
6+
FILENAME "wasi-sdk-${VERSION}-x86_64-linux.tar.gz"
7+
SHA512 0
8+
)
9+
elseif(UNIX)
110
vcpkg_download_distfile(ARCHIVE
211
URLS "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-${VERSION}-x86_64-linux.tar.gz"
312
FILENAME "wasi-sdk-${VERSION}-x86_64-linux.tar.gz"
413
SHA512 716acc4b737ad6f51c6b32c3423612c03df9a3165bde3d6e24df5c86779b8be9463f5a79e620f2fc49707275563a6c9710242caca27e1ad9dd2c69e8fce8a766
514
)
615

16+
elseif(WIN32)
17+
vcpkg_download_distfile(ARCHIVE
18+
URLS "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-${VERSION}-x86_64-windows.tar.gz"
19+
FILENAME "wasi-sdk-${VERSION}-x86_64-windows.tar.gz"
20+
SHA512 0
21+
)
22+
endif()
23+
724
vcpkg_extract_source_archive_ex(
825
OUT_SOURCE_PATH SOURCE_PATH
926
ARCHIVE ${ARCHIVE}

vcpkg_overlays/wasi-sdk/vcpkg.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
"version-string": "25.0",
44
"description": "Wasi SDK for building wasm from C++.",
55
"homepage": "https://github.com/WebAssembly/wasi-sdk",
6-
"supports": "linux",
76
"license": "Apache-2.0"
87
}

0 commit comments

Comments
 (0)