-
Notifications
You must be signed in to change notification settings - Fork 47
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
6 changed files
with
83 additions
and
80 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
#!/bin/bash | ||
|
||
set -Eexuo pipefail | ||
shopt -s nullglob | ||
|
||
srv="https://packages.edgedb.com" | ||
|
||
curl -fL "${srv}/dist/x86_64-unknown-linux-musl/edgedb-cli" \ | ||
> "/usr/local/bin/edgedb" | ||
|
||
chmod +x "/usr/local/bin/edgedb" | ||
|
||
# XXX: replace this with edgedb server install once that supports | ||
# portable builds. | ||
curl -fL "${srv}/archive/x86_64-unknown-linux-gnu/edgedb-server-1.0-rc.2%2Bc328744.tar.gz" \ | ||
> "/tmp/edgedb-server.tar.gz" | ||
|
||
mkdir -p "/opt/edgedb-server" | ||
tar -xz --strip-components=1 -C "/opt/edgedb-server" -f "/tmp/edgedb-server.tar.gz" | ||
ln -s "/opt/edgedb-server/bin/edgedb-server" "/usr/local/bin/edgedb-server" | ||
|
||
useradd --shell /bin/bash edgedb | ||
edgedb-server --version |
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 |
---|---|---|
|
@@ -39,7 +39,7 @@ jobs: | |
mkdir -p dist/ | ||
echo "${VERSION}" > dist/VERSION | ||
- uses: actions/upload-artifact@v1 | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist/ | ||
|
@@ -52,98 +52,99 @@ jobs: | |
PIP_DISABLE_PIP_VERSION_CHECK: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 50 | ||
submodules: true | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: "3.9" | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
|
||
- name: Build source distribution | ||
run: | | ||
pip install -U setuptools wheel pip | ||
python setup.py sdist | ||
- uses: actions/upload-artifact@v1 | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist/ | ||
path: dist/*.tar.* | ||
|
||
build-wheels: | ||
needs: validate-release-request | ||
runs-on: ${{ matrix.os }} | ||
|
||
env: | ||
PIP_DISABLE_PIP_VERSION_CHECK: 1 | ||
|
||
strategy: | ||
matrix: | ||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
cibw_python: ["cp36-*", "cp37-*", "cp38-*", "cp39-*", "cp310-*"] | ||
cibw_arch: ["auto64"] | ||
exclude: | ||
# Tests fail on this combination. | ||
- os: macos-latest | ||
cibw_python: "cp36-*" | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
PIP_DISABLE_PIP_VERSION_CHECK: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 50 | ||
submodules: true | ||
|
||
- name: Install EdgeDB | ||
if: "!startsWith(matrix.os, 'windows')" | ||
uses: edgedb/setup-edgedb@v1 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install Python Deps | ||
run: | | ||
python -m pip install --upgrade setuptools pip wheel | ||
- name: Build Wheels (linux) | ||
if: startsWith(matrix.os, 'ubuntu') | ||
uses: docker://quay.io/pypa/manylinux1_x86_64 | ||
env: | ||
PYTHON_VERSION: ${{ matrix.python-version }} | ||
- name: Setup WSL | ||
if: ${{ steps.release.outputs.version == 0 && matrix.os == 'windows-latest' }} | ||
uses: vampire/setup-wsl@v1 | ||
with: | ||
entrypoint: /github/workspace/.github/workflows/build-manylinux-wheels.sh | ||
wsl-shell-user: edgedb | ||
additional-packages: | ||
ca-certificates | ||
curl | ||
|
||
- name: Build Wheels (non-linux) | ||
if: "!startsWith(matrix.os, 'ubuntu')" | ||
run: | | ||
make clean | ||
python setup.py bdist_wheel | ||
- name: Install EdgeDB | ||
uses: edgedb/setup-edgedb@v1 | ||
|
||
- name: Test Wheels | ||
- uses: pypa/[email protected] | ||
env: | ||
PKG_VERSION: ${{ needs.validate-release-request.outputs.version }} | ||
if: | | ||
!startsWith(matrix.os, 'windows') | ||
&& !contains(github.event.pull_request.labels.*.name, 'skip wheel tests') | ||
run: | | ||
pip install -f "file:///${GITHUB_WORKSPACE}/dist" \ | ||
edgedb[test]==${PKG_VERSION} | ||
make -C "${GITHUB_WORKSPACE}" testinstalled | ||
- uses: actions/upload-artifact@v1 | ||
CIBW_BUILD_VERBOSITY: 1 | ||
CIBW_BUILD: ${{ matrix.cibw_python }} | ||
# Cannot test on Musl distros yet. | ||
CIBW_SKIP: "*-musllinux*" | ||
CIBW_ARCHS: ${{ matrix.cibw_arch }} | ||
# EdgeDB doesn't run on CentOS 6, so use 2014 as baseline | ||
CIBW_MANYLINUX_X86_64_IMAGE: "quay.io/pypa/manylinux2014_x86_64" | ||
CIBW_BEFORE_ALL_LINUX: > | ||
.github/workflows/install-edgedb.sh | ||
CIBW_TEST_EXTRAS: "test" | ||
CIBW_TEST_COMMAND: > | ||
python {project}/tests/__init__.py | ||
CIBW_TEST_COMMAND_WINDOWS: > | ||
python {project}\tests\__init__.py | ||
CIBW_TEST_COMMAND_LINUX: > | ||
PY=`which python` | ||
&& chmod -R go+rX "$(dirname $(dirname $(dirname $PY)))" | ||
&& su -l edgedb -c "$PY {project}/tests/__init__.py" | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist/ | ||
path: wheelhouse/*.whl | ||
|
||
publish: | ||
needs: [build-sdist, build-wheels] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 5 | ||
submodules: false | ||
|
||
- uses: actions/download-artifact@v1 | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: dist | ||
path: 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 |
---|---|---|
|
@@ -28,3 +28,4 @@ docs/_build | |
/reflog.txt | ||
/edgedb/**/*.html | ||
/tmp | ||
/wheelhouse |
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
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