From e4375836c0b498e23af898c6bf1edc99a72d63b6 Mon Sep 17 00:00:00 2001 From: Jonas Leitner Date: Wed, 9 Apr 2025 15:45:53 +0200 Subject: [PATCH 1/4] naively try upgrading macos and all outdated actions --- .github/workflows/ci.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 77685dd9..1df89b4a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 @@ -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: @@ -61,7 +61,7 @@ jobs: ./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 @@ -71,7 +71,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 From 74ecfbba13d5d0cd6647f08aeb1bebde34549ad2 Mon Sep 17 00:00:00 2001 From: Jonas Leitner Date: Wed, 9 Apr 2025 20:01:56 +0200 Subject: [PATCH 2/4] adjust compiler paths for arm64 --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1df89b4a..98023760 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 From a62108baba5962b2c3c4065b98af56700d1ea9cf Mon Sep 17 00:00:00 2001 From: Jonas Leitner Date: Thu, 10 Apr 2025 07:32:42 +0200 Subject: [PATCH 3/4] try upgrading to new setuptools version --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 98023760..cbbb7fd1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -58,6 +58,7 @@ 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 From bdb647a46eee1e0603d28765109b32d1afe5ce05 Mon Sep 17 00:00:00 2001 From: Jonas Leitner Date: Sat, 12 Apr 2025 08:19:04 +0200 Subject: [PATCH 4/4] allow releases with tags of the form v[version][suffix] for an arbitrary suffix --- scripts/pack_release.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/pack_release.py b/scripts/pack_release.py index a7f6416f..a3b7c6fa 100755 --- a/scripts/pack_release.py +++ b/scripts/pack_release.py @@ -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"] +)