fix copying the libraries in release #53
Workflow file for this run
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
name: Release | |
on: | |
push: | |
tags: | |
- 'v**' | |
permissions: | |
contents: write | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build-libs_linux-shared_x86-64: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Necessary Packages | |
run: sudo apt install libwayland-dev libxkbcommon-dev xorg-dev | |
- name: Install Python Packages | |
run: pip install typing-extensions | |
- name: Download Headers | |
run: ./script/library/libheader.sh | |
- name: Download Libeigen | |
run: ./script/library/libeigen.sh | |
- name: Build Libboost | |
run: ./script/library/libboost.sh ON 2 | |
- name: Build Libfftw | |
run: ./script/library/libfftw.sh ON 2 | |
- name: Build Libglad | |
run: ./script/library/libglad.sh ON 2 | |
- name: Build Libglfw | |
run: ./script/library/libglfw.sh ON 2 | |
- name: Build Libglm | |
run: ./script/library/libglm.sh ON 2 | |
- name: Build Libint | |
run: ./script/library/libint.sh ON 2 | |
- name: Build Libnuma | |
run: ./script/library/libnuma.sh ON 2 | |
- name: Build Libopenblas | |
run: ./script/library/libopenblas.sh ON 2 | |
- name: Build Libtorch | |
run: ./script/library/libtorch.sh ON 2 | |
- name: Package the Libraries | |
run: cd external && tar -czf acorn-libs_linux-shared_x86-64.tar.gz * && cd - | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libs_linux-shared | |
path: external/acorn-libs_linux-shared_x86-64.tar.gz | |
build-libs_linux-static_x86-64: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Necessary Packages | |
run: sudo apt install libwayland-dev libxkbcommon-dev xorg-dev | |
- name: Install Python Packages | |
run: pip install typing-extensions | |
- name: Download Headers | |
run: ./script/library/libheader.sh | |
- name: Download Libeigen | |
run: ./script/library/libeigen.sh | |
- name: Build Libboost | |
run: ./script/library/libboost.sh OFF 2 | |
- name: Build Libfftw | |
run: ./script/library/libfftw.sh OFF 2 | |
- name: Build Libglad | |
run: ./script/library/libglad.sh OFF 2 | |
- name: Build Libglfw | |
run: ./script/library/libglfw.sh OFF 2 | |
- name: Build Libglm | |
run: ./script/library/libglm.sh OFF 2 | |
- name: Build Libint | |
run: ./script/library/libint.sh OFF 2 | |
- name: Build Libnuma | |
run: ./script/library/libnuma.sh OFF 2 | |
- name: Build Libopenblas | |
run: ./script/library/libopenblas.sh OFF 2 | |
- name: Build Libtorch | |
run: ./script/library/libtorch.sh OFF 2 | |
- name: Package the Libraries | |
run: cd external && tar -czf acorn-libs_linux-static_x86-64.tar.gz * && cd - | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: libs_linux-static | |
path: external/acorn-libs_linux-static_x86-64.tar.gz | |
build-acorn_linux-shared_x86-64: | |
runs-on: ubuntu-22.04 | |
needs: [build-libs_linux-shared_x86-64] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Extract the Libraries | |
run: mkdir external && mv libs_linux-shared/acorn-libs_linux-shared_x86-64.tar.gz external/ && cd external && tar -xzf acorn-libs_linux-shared_x86-64.tar.gz && cd - | |
- name: Configure Acorn | |
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSTATIC=OFF | |
- name: Build Acorn | |
run: cmake --build build --parallel 2 | |
- name: Rename Binaries | |
run: mv bin/acorn bin/acorn_linux-shared_x86-64 | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-shared | |
path: bin/acorn_linux-shared_x86-64 | |
build-acorn_linux-static_x86-64: | |
runs-on: ubuntu-22.04 | |
needs: [build-libs_linux-static_x86-64] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Extract the Libraries | |
run: mkdir external && mv libs_linux-static/acorn-libs_linux-static_x86-64.tar.gz external/ && cd external && tar -xzf acorn-libs_linux-static_x86-64.tar.gz && cd - | |
- name: Configure Acorn | |
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSTATIC=ON | |
- name: Build Acorn | |
run: cmake --build build --parallel 2 | |
- name: Rename Binaries | |
run: mv bin/acorn bin/acorn_linux-static_x86-64 | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-static | |
path: bin/acorn_linux-static_x86-64 | |
release: | |
runs-on: ubuntu-latest | |
needs: [build-acorn_linux-shared_x86-64, build-acorn_linux-static_x86-64] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Remove Redundant Scripts | |
run: rm basis/update.sh example/molecule/generate.sh | |
- name: Create x86-64 Linux Shared Packages | |
run: cp linux-shared/acorn_linux-shared_x86-64 acorn && tar -czf acorn_linux-shared_x86-64.tar.gz acorn basis example script/plot LICENSE.md | |
- name: Create x86-64 Linux Static Packages | |
run: cp linux-static/acorn_linux-static_x86-64 acorn && tar -czf acorn_linux-static_x86-64.tar.gz acorn basis example script/plot LICENSE.md | |
- name: Copy x86-64 Linux Shared and Static Libraries to the Root Folder | |
run: | | |
mv libs_linux-shared/acorn-libs_linux-shared_x86-64.tar.gz . | |
mv libs_linux-static/acorn-libs_linux-static_x86-64.tar.gz . | |
- name: Release linux-shared_x86-64 Version of Acorn | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{secrets.GITHUB_TOKEN}} | |
file: acorn_linux-shared_x86-64.tar.gz | |
tag: ${{github.ref}} | |
- name: Release linux-static_x86-64 Version of Acorn | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{secrets.GITHUB_TOKEN}} | |
file: acorn_linux-static_x86-64.tar.gz | |
tag: ${{github.ref}} | |
- name: Release linux-shared_x86-64 Version of Acorn Libraries | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{secrets.GITHUB_TOKEN}} | |
file: acorn-libs_linux-shared_x86-64.tar.gz | |
tag: ${{github.ref}} | |
- name: Release linux-static_x86-64 Version of Acorn Libraries | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{secrets.GITHUB_TOKEN}} | |
file: acorn-libs_linux-static_x86-64.tar.gz | |
tag: ${{github.ref}} |