From 9721986bbb62d7e403e82a94614cbb90d95b06be Mon Sep 17 00:00:00 2001 From: Liam Keegan Date: Mon, 14 Aug 2023 15:09:57 +0200 Subject: [PATCH] mac only --- .github/workflows/release.yml | 163 +++++++++++++++++----------------- build.sh | 2 + 2 files changed, 83 insertions(+), 82 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6778389..9bbac72 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,38 +7,38 @@ env: DUNE_COPASI_VERSION: "cxx20_and_libcpp_support" jobs: - linux: - name: Linux - runs-on: ubuntu-20.04 - env: - INSTALL_PREFIX: "/opt/smelibs" - SUDOCMD: "sudo" - OS_TARGET: "linux" - DUNE_USE_FALLBACK_FILESYSTEM: "ON" - CC: "clang" - CXX: "clang++" - defaults: - run: - shell: bash - steps: - - name: Add llvm repo for clang 16 & install - run: | - sudo wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" - sudo apt update -yy - sudo apt install -yy clang-16 - - name: Set clang version - run: | - sudo update-alternatives --remove-all clang || echo "nothing to remove" - sudo update-alternatives --remove-all clang++ || echo "nothing to remove" - sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100 - sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100 - - uses: actions/checkout@v3 - - name: Build script - run: ./build.sh - - uses: actions/upload-artifact@v3 - with: - path: ./artefacts/* + # linux: + # name: Linux + # runs-on: ubuntu-20.04 + # env: + # INSTALL_PREFIX: "/opt/smelibs" + # SUDOCMD: "sudo" + # OS_TARGET: "linux" + # DUNE_USE_FALLBACK_FILESYSTEM: "ON" + # CC: "clang" + # CXX: "clang++" + # defaults: + # run: + # shell: bash + # steps: + # - name: Add llvm repo for clang 16 & install + # run: | + # sudo wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + # sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main" + # sudo apt update -yy + # sudo apt install -yy clang-16 + # - name: Set clang version + # run: | + # sudo update-alternatives --remove-all clang || echo "nothing to remove" + # sudo update-alternatives --remove-all clang++ || echo "nothing to remove" + # sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100 + # sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100 + # - uses: actions/checkout@v3 + # - name: Build script + # run: ./build.sh + # - uses: actions/upload-artifact@v3 + # with: + # path: ./artefacts/* macos: name: MacOS @@ -57,8 +57,7 @@ jobs: steps: - run: brew install llvm@16 - run: brew info llvm - - run: clang++ --version - - run: which clang++ + - run: ls /usr/local/opt/llvm/lib/c++ - uses: actions/checkout@v3 - name: Build script run: ./build.sh @@ -66,52 +65,52 @@ jobs: with: path: ./artefacts/* - win64: - name: Windows 64-bit - runs-on: windows-2022 - env: - INSTALL_PREFIX: "/c/smelibs" - SUDOCMD: "" - OS_TARGET: "win64-mingw" - DUNE_USE_FALLBACK_FILESYSTEM: "OFF" - defaults: - run: - shell: msys2 {0} - steps: - - uses: actions/checkout@v3 - - uses: msys2/setup-msys2@v2 - with: - msystem: MINGW64 - update: true - install: mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake make git dos2unix - - name: Build script - run: ./build.sh - - uses: actions/upload-artifact@v3 - with: - path: ./artefacts/* + # win64: + # name: Windows 64-bit + # runs-on: windows-2022 + # env: + # INSTALL_PREFIX: "/c/smelibs" + # SUDOCMD: "" + # OS_TARGET: "win64-mingw" + # DUNE_USE_FALLBACK_FILESYSTEM: "OFF" + # defaults: + # run: + # shell: msys2 {0} + # steps: + # - uses: actions/checkout@v3 + # - uses: msys2/setup-msys2@v2 + # with: + # msystem: MINGW64 + # update: true + # install: mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake make git dos2unix + # - name: Build script + # run: ./build.sh + # - uses: actions/upload-artifact@v3 + # with: + # path: ./artefacts/* - release: - name: Upload Binaries to GitHub Release - needs: [linux, macos, win64] - runs-on: ubuntu-latest - # upload binaries to github release if commit is tagged - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') - steps: - - uses: dev-drprasad/delete-older-releases@v0.2.1 - with: - repo: spatial-model-editor/sme_deps - keep_latest: 5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/download-artifact@v3 - with: - name: artifact - path: binaries - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: binaries/* - tag: ${{ github.ref }} - overwrite: true - file_glob: true + # release: + # name: Upload Binaries to GitHub Release + # needs: [linux, macos, win64] + # runs-on: ubuntu-latest + # # upload binaries to github release if commit is tagged + # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') + # steps: + # - uses: dev-drprasad/delete-older-releases@v0.2.1 + # with: + # repo: spatial-model-editor/sme_deps + # keep_latest: 5 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # - uses: actions/download-artifact@v3 + # with: + # name: artifact + # path: binaries + # - name: Upload binaries to release + # uses: svenstaro/upload-release-action@v2 + # with: + # repo_token: ${{ secrets.GITHUB_TOKEN }} + # file: binaries/* + # tag: ${{ github.ref }} + # overwrite: true + # file_glob: true diff --git a/build.sh b/build.sh index 2abddc3..0d2c017 100755 --- a/build.sh +++ b/build.sh @@ -15,6 +15,8 @@ g++ --version gcc --version cmake --version +export PATH="/usr/local/opt/llvm/bin:$PATH" + echo "Downloading static libs for OS_TARGET: $OS_TARGET" wget "https://github.com/spatial-model-editor/sme_deps_common/releases/download/${SME_DEPS_COMMON_VERSION}/sme_deps_common_${OS_TARGET}.tgz" tar xf sme_deps_common_${OS_TARGET}.tgz