Skip to content

Commit

Permalink
Start a wasm CI target
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Jul 9, 2022
1 parent 202b8ba commit c8d0ac9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/bootstrap.yml
Expand Up @@ -29,6 +29,10 @@ jobs:
installer: homebrew
os: macos-10.15
target: macos-universal
- name: wasm
installer: apt
os: ubuntu-20.04
target: wasm
- name: win32
installer: apt
os: ubuntu-20.04
Expand Down Expand Up @@ -67,6 +71,11 @@ jobs:
if [ '${{ matrix.target }}' == 'linux' ]; then \
sudo apt-get install -yqq libdbus-1-dev libgl1-mesa-dev libglib2.0-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev; \
fi
# extra, for wasm
if [ '${{ matrix.target }}' == 'wasm' ]; then \
git clone https://github.com/emscripten-core/emsdk.git; \
cd emsdk && ./emsdk install latest && ./emsdk activate latest; \
fi
# extra, for win32
if [ '${{ matrix.target }}' == 'win32' ]; then \
sudo dpkg --add-architecture i386; \
Expand Down Expand Up @@ -95,6 +104,9 @@ jobs:
- name: Run bootstrap
shell: bash
run: |
if [ '${{ matrix.target }}' == 'wasm' ]; then \
source ./emsdk/emsdk_env.sh; \
fi
./bootstrap-common.sh ${{ matrix.target }} && ./.cleanup.sh ${{ matrix.target }}
- name: Pack bootstrap build
shell: bash
Expand Down
1 change: 0 additions & 1 deletion setup/check_target.sh
Expand Up @@ -22,7 +22,6 @@ function check_target() {
WASM=1
CROSS_COMPILING=1
PAWPAW_SKIP_FORTIFY=1
PAWPAW_SKIP_LTO=1
;;
"win32"|"MINGW32"*)
WIN32=1
Expand Down
4 changes: 3 additions & 1 deletion setup/functions.sh
Expand Up @@ -193,7 +193,9 @@ function build_autoconf() {

local pkgdir="${PAWPAW_BUILDDIR}/${name}-${version}"

if [ "${CROSS_COMPILING}" -eq 1 ]; then
if [ "${WASM}" -eq 1 ]; then
extraconfrules="--host=x86_64-linux-gnu ${extraconfrules}"
elif [ "${CROSS_COMPILING}" -eq 1 ]; then
extraconfrules="--host=${TOOLCHAIN_PREFIX} ${extraconfrules}"
fi

Expand Down

0 comments on commit c8d0ac9

Please sign in to comment.