mirror of https://github.com/pyodide/pyodide.git
CI Add MacOS build (#3602)
This commit is contained in:
parent
d6ce2b6edd
commit
52c033af9f
|
@ -2,7 +2,6 @@ name: main
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
|
@ -74,7 +73,11 @@ jobs:
|
||||||
fail_ci_if_error: false
|
fail_ci_if_error: false
|
||||||
|
|
||||||
build-core:
|
build-core:
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
EMSDK_NUM_CORES: 3
|
EMSDK_NUM_CORES: 3
|
||||||
EMCC_CORES: 3
|
EMCC_CORES: 3
|
||||||
|
@ -89,7 +92,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
/tmp/ccache
|
/tmp/ccache
|
||||||
key: ${{ hashFiles('Makefile.envs') }}-v20211025-
|
key: ${{ hashFiles('Makefile.envs') }}-${{ runner.os }}-v20211025-
|
||||||
|
|
||||||
- uses: conda-incubator/setup-miniconda@v2
|
- uses: conda-incubator/setup-miniconda@v2
|
||||||
with:
|
with:
|
||||||
|
@ -103,11 +106,22 @@ jobs:
|
||||||
python --version
|
python --version
|
||||||
which python
|
which python
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies (ubuntu)
|
||||||
shell: bash -l {0}
|
shell: bash -l {0}
|
||||||
|
if: ${{ contains(runner.os, 'ubuntu') }}
|
||||||
run: |
|
run: |
|
||||||
sudo apt install -y build-essential git xxd
|
sudo apt install -y build-essential git xxd
|
||||||
conda install -y nodejs ccache f2c pkg-config swig make patch pkg-config texinfo autoconf automake libtool
|
|
||||||
|
- name: Install dependencies (macos)
|
||||||
|
shell: bash -l {0}
|
||||||
|
if: ${{ contains(runner.os, 'macos') }}
|
||||||
|
run: |
|
||||||
|
brew install coreutils
|
||||||
|
|
||||||
|
- name: Install dependencies (common)
|
||||||
|
shell: bash -l {0}
|
||||||
|
run: |
|
||||||
|
conda install -y nodejs ccache f2c pkg-config swig make pkg-config texinfo autoconf automake libtool patch sed
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
- name: Build emsdk
|
- name: Build emsdk
|
||||||
|
@ -150,12 +164,12 @@ jobs:
|
||||||
- name: Store artifacts build
|
- name: Store artifacts build
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: core-build
|
name: core-build-${{ runner.os }}
|
||||||
path: ./dist/
|
path: ./dist/
|
||||||
retention-days: 60
|
retention-days: 60
|
||||||
|
|
||||||
test-core:
|
test-core:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
DISPLAY: :99
|
DISPLAY: :99
|
||||||
|
|
||||||
|
@ -163,6 +177,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
os: [ubuntu-latest, macos-latest]
|
||||||
runner: [playwright]
|
runner: [playwright]
|
||||||
browser: [chrome]
|
browser: [chrome]
|
||||||
|
|
||||||
|
@ -172,7 +187,7 @@ jobs:
|
||||||
- name: Download build artifact
|
- name: Download build artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: core-build
|
name: core-build-${{ runner.os }}
|
||||||
path: ./dist/
|
path: ./dist/
|
||||||
|
|
||||||
- uses: conda-incubator/setup-miniconda@v2
|
- uses: conda-incubator/setup-miniconda@v2
|
||||||
|
|
|
@ -40,8 +40,32 @@ check_cmake() {
|
||||||
check_binary_present "cmake"
|
check_binary_present "cmake"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_sed() {
|
||||||
|
check_binary_present "sed"
|
||||||
|
gnu_sed_found=$(sed --help | grep -q gnu.org)
|
||||||
|
|
||||||
|
if [ "${gnu_sed_found}" ]; then
|
||||||
|
echo >&2 "Pyodide requires GNU sed."
|
||||||
|
echo >&2 "If you are on macOS you can install it with 'brew install gnu-sed' and then add it to your PATH."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_patch() {
|
||||||
|
check_binary_present "patch"
|
||||||
|
gnu_patch_found=$(patch --help | grep -q gnu.org)
|
||||||
|
|
||||||
|
if [ "${gnu_patch_found}" ]; then
|
||||||
|
echo >&2 "Pyodide requires GNU patch."
|
||||||
|
echo >&2 "If you are on macOS you can install it with 'brew install gpatch' and then add it to your PATH."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
check_python_version
|
check_python_version
|
||||||
check_pkgconfig
|
check_pkgconfig
|
||||||
check_cmake
|
check_cmake
|
||||||
|
check_sed
|
||||||
|
check_patch
|
||||||
#check_python_headers
|
#check_python_headers
|
||||||
check_shasum
|
check_shasum
|
||||||
|
|
Loading…
Reference in New Issue