forked from CzBiX/disasm-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build capstone and keystone using emscripten | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
setup: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialize and install dependencies | ||
run: | | ||
git submodule update --init --recursive | ||
chmod +x ./install_deps.sh | ||
./install_deps.sh | ||
- name: Build capstone | ||
run: | | ||
cd packages/capstone | ||
chmod +x ./build-lib.sh | ||
./build-lib.sh | ||
npm install | ||
npm run build | ||
- name: Upload capstone dist folder | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: capstone-dist | ||
path: packages/capstone/dist | ||
|
||
- name: Build keystone | ||
run: | | ||
cd packages/keystone | ||
chmod +x ./build-lib.sh | ||
./build-lib.sh | ||
npm install | ||
npm run build | ||
- name: Upload keystone dist folder | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: keystone-dist | ||
path: packages/keystone/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bash | ||
|
||
VERSION=latest | ||
|
||
# Install Homebrew if not present | ||
if ! command -v brew &> /dev/null; then | ||
echo "Homebrew not found, installing..." | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
export PATH="/opt/homebrew/bin:$PATH" # Ensure Homebrew is on the PATH | ||
fi | ||
|
||
# Install realpath and jq via Homebrew | ||
if ! command -v realpath &> /dev/null; then | ||
echo "realpath not found, installing..." | ||
brew install coreutils | ||
fi | ||
|
||
if ! command -v jq &> /dev/null; then | ||
echo "jq not found, installing..." | ||
brew install jq | ||
fi | ||
|
||
# Install cmake via Homebrew | ||
if ! command -v cmake &> /dev/null; then | ||
echo "cmake not found, installing..." | ||
brew install cmake | ||
fi | ||
|
||
# Install emsdk | ||
cd | ||
git clone https://github.com/emscripten-core/emsdk.git --depth 1 | ||
cd emsdk | ||
./emsdk install $VERSION | ||
./emsdk activate $VERSION |