-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add release (#1) * add release.yaml to help release * change the action name * delete trigger branch limit * add branch limit * Add release (#2) * add release.yaml to help release * change the action name * delete trigger branch limit * add branch limit * add needs * fix some bugs * add wheel to requirements-dev.txt * fix wrong command * move publish to a single job * delete wrong command * change upload mistake * fix wrong macos platform tag * juicefs can format and init on Windows * Wrap os.path.join() with Path().as_posix() to support Windows. jfs.concat() remains problematic on Windows * format the files
- Loading branch information
Showing
8 changed files
with
193 additions
and
15 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
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,142 @@ | ||
name: release wheel | ||
on: | ||
workflow_dispatch: | ||
branches: [main] | ||
|
||
jobs: | ||
build-juicefs-libjfs: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-18.04, macos-latest] | ||
|
||
steps: | ||
- name: Checkout Github Repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Golang | ||
uses: actions/setup-go@v2 | ||
- name: Get JuiceFS Version | ||
id: jfs-version | ||
run: echo "::set-output name=JUICEFS_VERSION::$(make -s print_libjfs_version)" | ||
|
||
- name: Cache juicefs and libjfs binary linux/mac | ||
uses: actions/cache@v2 | ||
id: jfs-cache | ||
with: | ||
path: | | ||
./juicefs/lib/libjfs.so | ||
./juicefs/lib/juicefs | ||
key: ${{ matrix.os }}-jfs-binary-${{ steps.jfs-version.outputs.JUICEFS_VERSION }} | ||
|
||
- name: Run build-libjfs linux/mac | ||
if: ${{ steps.jfs-cache.outputs.cache-hit != 'true' }} | ||
run: | | ||
make build_libjfs_so | ||
- name: Upload linux jfs binary | ||
if: matrix.os == 'ubuntu-18.04' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: jfs-binary-linux-${{ steps.jfs-version.outputs.JUICEFS_VERSION }} | ||
path: | | ||
./juicefs/lib/libjfs.so | ||
./juicefs/lib/juicefs | ||
retention-days: 1 | ||
- name: Upload macos jfs binary | ||
if: matrix.os == 'macos-latest' | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: jfs-binary-mac-${{ steps.jfs-version.outputs.JUICEFS_VERSION }} | ||
path: | | ||
./juicefs/lib/libjfs.so | ||
./juicefs/lib/juicefs | ||
retention-days: 1 | ||
|
||
build_release: | ||
needs: build-juicefs-libjfs | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-18.04, macos-latest] | ||
python-version: [3.6] | ||
include: | ||
- os: ubuntu-18.04 | ||
os-key: linux | ||
pip-path: /opt/hostedtoolcache/Python | ||
plat-name: manylinux2014_x86_64 | ||
- os: macos-latest | ||
os-key: mac | ||
pip-path: /Users/runner/hostedtoolcache/Python | ||
plat-name: macosx_10_15_x86_64 | ||
|
||
steps: | ||
- name: Checkout Github Repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Cache Pip | ||
id: pip-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ matrix.pip-path }} | ||
key: ${{ matrix.os }}-python${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }} | ||
- name: Install Package Dependencies | ||
if: steps.pip-cache.outputs.cache-hit != 'true' | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-dev.txt | ||
pip install -r requirements.txt | ||
- name: Get JuiceFS Version | ||
id: jfs-version | ||
run: echo "::set-output name=JUICEFS_VERSION::$(make -s print_libjfs_version)" | ||
- name: Download jfs binary artifact Linux/Mac | ||
if: ${{ matrix.os != 'windows-latest' }} | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: jfs-binary-${{ matrix.os-key }}-${{ steps.jfs-version.outputs.JUICEFS_VERSION }} | ||
path: ./juicefs/lib/ | ||
- name: Chmod to make juicefs executable linux/mac | ||
if: ${{ matrix.os != 'windows-latest' }} | ||
run: | | ||
chmod 755 ./juicefs/lib/juicefs | ||
ls -l ./juicefs/lib/juicefs | ||
- name: Build wheel | ||
run: | | ||
python setup.py bdist_wheel --plat-name ${{ matrix.plat-name }} | ||
- name: Upload Wheel | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: jfs-wheel-${{ matrix.os-key }}-${{ steps.jfs-version.outputs.JUICEFS_VERSION }} | ||
path: | | ||
./dist/* | ||
retention-days: 1 | ||
|
||
publish_release: | ||
needs: build_release | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-18.04] | ||
|
||
steps: | ||
- name: Checkout Github Repository | ||
uses: actions/checkout@v2 | ||
- name: Get JuiceFS Version | ||
id: jfs-version | ||
run: echo "::set-output name=JUICEFS_VERSION::$(make -s print_libjfs_version)" | ||
- name: Download jfs wheel artifact Linux | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: jfs-wheel-linux-${{ steps.jfs-version.outputs.JUICEFS_VERSION }} | ||
path: ./dist/ | ||
- name: Download jfs wheel artifact Mac | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: jfs-wheel-mac-${{ steps.jfs-version.outputs.JUICEFS_VERSION }} | ||
path: ./dist/ | ||
- name: Publish package to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.JUICEFS_PYPI_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
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,4 +1,5 @@ | ||
setuptools | ||
wheel | ||
|
||
pytest | ||
pytest-cov | ||
|
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
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