Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-12]
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install dependencies on Linux
run: |
sudo apt-get install libopenblas-dev ninja-build ccache
Expand All @@ -26,7 +26,7 @@ jobs:
brew install ninja ccache libomp cmake llvm
brew install coreutils || true
if: contains( matrix.os, 'macos')
- uses: actions/cache@v1
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
Expand All @@ -48,7 +48,7 @@ jobs:
shell: bash
run: |
ccache --max-size 2G
CC=/usr/local/opt/llvm/bin/clang CXX=/usr/local/opt/llvm/bin/clang++ ./build_libtensor.py -v -d ${{runner.workspace}}/build --install ${{runner.workspace}}/install --type Release --features libxm
CC=/opt/homebrew/opt/llvm/bin/clang CXX=/opt/homebrew/opt/llvm/bin/clang++ ./build_libtensor.py -v -d ${{runner.workspace}}/build --install ${{runner.workspace}}/install --type Release --features libxm

- name: Test
working-directory: ${{runner.workspace}}/build
Expand All @@ -58,10 +58,11 @@ jobs:
- name: Bundle tarball
shell: bash
run: |
python -m pip install --user -U setuptools
./scripts/pack_release.py ${{runner.workspace}}/install

- name: Upload tarball as artefact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: libtensorlight-${{ matrix.os }}
path: libtensorlight-*.tar.gz
Expand All @@ -71,7 +72,7 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Glob asset paths
Expand Down
10 changes: 8 additions & 2 deletions scripts/pack_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@
universal_newlines=True).strip()
git_tag = subprocess.check_output(["git", "tag", "--points-at", git_revision],
universal_newlines=True).strip()
if not re.match("^v([0-9.]+)$", git_tag):
if git_tag.startswith(f"v{ltl_version}"):
# allow any tag of the form v[version][suffix] with an arbitrary suffix
# However, the CI requires that there are no '-' in the suffix
ltl_version = git_tag.replace('-', '_')
else:
ltl_version = ltl_version + ".dev"

filename = f"libtensorlight-{ltl_version}-{platform}.tar.gz"
subprocess.check_call(["tar", "-C", install_dir, "-czf", filename, "include", "lib"])
subprocess.check_call(
["tar", "-C", install_dir, "-czf", filename, "include", "lib"]
)
Loading