-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4923 from psafont/pyver
- Loading branch information
Showing
6 changed files
with
25 additions
and
71 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 |
---|---|---|
|
@@ -15,56 +15,27 @@ jobs: | |
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Pull configuration from xs-opam | ||
run: | | ||
curl --fail --silent https://raw.githubusercontent.com/xapi-project/xs-opam/master/tools/xs-opam-ci.env | cut -f2 -d " " > .env | ||
- name: Load environment file | ||
id: dotenv | ||
uses: falti/[email protected] | ||
|
||
- name: Use python | ||
- name: Use python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Retrieve date for cache key | ||
id: cache-key | ||
run: echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")" | ||
shell: bash | ||
|
||
- name: Restore opam cache | ||
id: opam-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: "~/.opam" | ||
# invalidate cache daily, gets built daily using a scheduled job | ||
key: ${{ steps.cache-key.outputs.date }} | ||
|
||
- name: Use ocaml | ||
uses: ocaml/setup-ocaml@v1 | ||
with: | ||
ocaml-version: ${{ steps.dotenv.outputs.ocaml_version_full }} | ||
opam-repository: ${{ steps.dotenv.outputs.repository }} | ||
|
||
- name: Install dependencies | ||
- name: Install build dependencies | ||
run: | | ||
opam update | ||
opam pin add xapi-datamodel . --no-action | ||
opam upgrade | ||
opam install xapi-stdext-unix xapi-datamodel | ||
pip install build | ||
sudo apt-get install ocaml dune libfindlib-ocaml-dev libdune-ocaml-dev libcmdliner-ocaml-dev | ||
- name: Generate python package for XenAPI | ||
run: | | ||
opam exec -- ./configure | ||
opam exec -- make python | ||
./configure --xapi-version=${{ github.ref_name }} | ||
make python | ||
- name: Draft Release ${{ github.ref_name }} | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
scripts/examples/python/dist/* | ||
fail_on_unmatched_files: true | ||
draft: true | ||
generate_release_notes: true | ||
run: gh release create ${{ github.ref_name }} --draft --generate-notes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload artifacts | ||
run: gh release upload ${{ github.ref_name }} scripts/examples/python/dist/* | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
PROFILE=release | ||
SETUPTOOLS_SCM_PRETEND_VERSION ?= "" | ||
|
||
.PHONY: build clean | ||
|
||
build: setup.py | ||
pip wheel -w dist --no-deps . | ||
python setup.py sdist | ||
|
||
setup.py: | ||
dune build --profile=$(PROFILE) ./setuppy_gen.exe | ||
dune exec --profile=$(PROFILE) -- ./setuppy_gen.exe | ||
build: | ||
SETUPTOOLS_SCM_PRETEND_VERSION=$(XAPI_VERSION) python -m build --wheel . | ||
SETUPTOOLS_SCM_PRETEND_VERSION=$(XAPI_VERSION) python -m build --sdist . | ||
|
||
clean: | ||
dune clean | ||
rm -rf setup.py dist/ build/ XenAPI.egg-info/ | ||
rm -rf dist/ build/ XenAPI.egg-info/ |
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[build-system] | ||
requires = ["setuptools >= 38.6.0", "wheel"] | ||
build-backend = "setuptools.build_meta:__legacy__" | ||
requires = ["setuptools >= 38.6.0", "setuptools_scm[toml]", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
root = "../../.." |
This file was deleted.
Oops, something went wrong.