Skip to content

Commit

Permalink
Merge pull request #2 from HugoAhoy/add_build_jfs_gh_action
Browse files Browse the repository at this point in the history
Add github action to build juicefs and libjfs.so
  • Loading branch information
bbtfr committed Aug 17, 2021
2 parents a31767c + aae7b23 commit b3aa154
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get Denpendent JuiceFS Version
id: jfs-version
run: echo "::set-output name=JUICEFS_VERSION::$(make -s print_jfs_version)"
- name: Cache juicefs and libjfs.so
id: jfs-cache
uses: actions/cache@v2
with:
path: ./juicefs/lib
key: ${{ matrix.os }}-jfs${{ steps.jfs-version.outputs.JUICEFS_VERSION }}
restore-keys: |
${{ matrix.os }}-jfs-
${{ matrix.os }}-
- name: Cache pip
id: pip-cache
uses: actions/cache@v2
Expand All @@ -27,6 +39,11 @@ jobs:
restore-keys: |
${{ matrix.os }}-pip-
${{ matrix.os }}-
- name: Build juicefs and libjfs.so
if: steps.jfs-cache.outputs.cache-hit != 'true'
run: |
make build_juicefs
make build_libjfs
- name: Install package dependencies
if: steps.pip-cache.outputs.cache-hit != 'true'
run: |
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ PACKAGE := juicefs
VERSION := $(shell cat juicefs/version.py | sed -n -E 's/^VERSION = "(.+?)"/\1/p')
JUICEFS_VERSION := 0.14.2

print_jfs_version:
echo ${JUICEFS_VERSION}

clean:
rm -rf dist build *.egg-info .pytype .pytest_cache .pytype_output

Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,17 @@ Clone the repository:
git clone git@github.com:megvii-research/juicefs-python.git
```

And then install requirements:
And then build `juicefs` and `libjfs.so`:

```
cd juicefs-python
make build_juicefs
make build_libjfs
```

finally, install requirements:

```
pip install -r requirements.txt
```

Expand Down
Binary file removed juicefs/lib/juicefs
Binary file not shown.
Binary file removed juicefs/lib/libjfs.so
Binary file not shown.

0 comments on commit b3aa154

Please sign in to comment.