Skip to content

Commit

Permalink
Merge pull request #87 from swiftwasm/katei/cmake-ci
Browse files Browse the repository at this point in the history
Build with CMake on CI
  • Loading branch information
kateinoigakukun authored Apr 26, 2024
2 parents 08f3f07 + 4f1452c commit 9a3572d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
uses: swiftwasm/setup-swiftwasm@v1
with:
swift-version: "wasm-5.8.0-RELEASE"
add-to-path: false
- name: Select Xcode version
run: sudo xcode-select -switch /Applications/${{ matrix.xcode }}.app
- name: Configure Tests/default.json
Expand All @@ -37,7 +38,7 @@ jobs:
"hostSdkRootPath": "$(xcrun --show-sdk-path --sdk macosx)"
}
EOS
- run: env PATH=/usr/bin:$PATH swift test
- run: swift test
# TODO: Enable spectest and wasi-testsuite checks

build-linux:
Expand All @@ -61,6 +62,7 @@ jobs:
uses: swiftwasm/setup-swiftwasm@v1
with:
swift-version: "wasm-5.8.0-RELEASE"
add-to-path: false
- name: Configure Tests/default.json
run: |
cat <<EOS > Tests/default.json
Expand All @@ -69,6 +71,24 @@ jobs:
"hostSwiftExecutablePath": "/usr/bin/swift"
}
EOS
- run: env PATH=/usr/bin:$PATH swift test
- run: swift test
- run: ./CI/check-spectest.sh
- run: ./CI/check-wasi-testsuite.sh

build-cmake:
runs-on: ubuntu-20.04
container:
image: swift:5.8-focal
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Ninja
run: apt-get update && apt-get install -y ninja-build
- name: Install CMake
run: |
apt-get install -y curl
curl -L https://github.com/Kitware/CMake/releases/download/v3.29.2/cmake-3.29.2-linux-x86_64.tar.gz | tar xz --strip-component 1 -C /usr/local/
- run: cmake -G Ninja -B ./build
- run: cmake --build ./build
- run: ./build/bin/wasmkit-cli --version
2 changes: 2 additions & 0 deletions Sources/WASI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ add_wasmkit_library(WASI
Platform/SandboxPrimitives.swift
FileSystem.swift
GuestMemorySupport.swift
Clock.swift
RandomBufferGenerator.swift
WASI.swift
)

Expand Down

0 comments on commit 9a3572d

Please sign in to comment.