Skip to content

Commit

Permalink
dist test
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuelSchneid3r committed Nov 7, 2024
1 parent e145470 commit 6fac1de
Showing 1 changed file with 25 additions and 24 deletions.
49 changes: 25 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
with:
submodules: 'recursive'
path: albert

- name: Create archives
run: |
tar --exclude=".*" -czvf ${{ github.ref_name }}.tar.gz albert
zip -r ${{ github.ref_name }}.zip albert -x "*/.*"
- name: Release
uses: softprops/action-gh-release@v1
with:
Expand All @@ -48,17 +48,17 @@ jobs:
- os: macos-14
buildname: macOS arm64
arch: 'arm64'

steps:

- name: Checkout source code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Get latest CMake and ninja
uses: lukka/get-cmake@latest

#- name: Install Qt dependencies
# uses: jurplel/install-qt-action@v3
# with:
Expand All @@ -75,7 +75,7 @@ jobs:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: brew install llvm qt python libqalculate # libarchive sparkle

#- name: Restore macports dependencies
# id: cache-macports # ref'ed below
# uses: actions/cache/restore@v4
Expand All @@ -84,7 +84,7 @@ jobs:
# /opt/local/lib
# /opt/local/include
# key: ${{ matrix.os }}-macports-r2

#- name: Install macports (for universal binaries of libqalculate and libarchive)
# if: steps.cache-macports.outputs.cache-hit != 'true'
# run: |
Expand All @@ -103,29 +103,29 @@ jobs:
# ;;
# esac
# sudo sh -c 'echo "\n+universal" >> /opt/local/etc/macports/variants.conf'

#- name: Install dependencies using macports
# if: steps.cache-macports.outputs.cache-hit != 'true'
# run : sudo /opt/local/bin/port install libqalculate libarchive # increase steps.cache-macports.outputs.cache-primary-key revision on change

#- name: Save macports dependencies
# uses: actions/cache/save@v4
# with:
# path: |
# /opt/local/lib
# /opt/local/include
# key: ${{ steps.cache-macports.outputs.cache-primary-key }}

- name: Build and package
run: |
cmake -S . -B build \
-DCMAKE_CXX_COMPILER=$(brew --prefix)/opt/llvm/bin/clang++ \
-DBUILD_PLUGIN_DEBUG=OFF \
-DBUILD_PLUGIN_DOCS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
#-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
#-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
cmake --build build
- name: Build and package
run: cd build && cpack -V

Expand All @@ -137,16 +137,17 @@ jobs:

- name: Append suffix
run: |
mv build/Albert-${{ github.ref_name }}.dmg build/Albert-${{ github.ref_name }}-${{ matrix.arch }}.dmg
mv build/Albert-${{ github.ref_name }}.dmg.sha256 build/Albert-${{ github.ref_name }}-${{ matrix.arch }}.dmg.sha256
dmg=build/Albert-*.dmg
mv "${dmg}" "${dmg::-4}-${{ matrix.arch }}.dmg"
mv "${dmg}".sha256 "${dmg::-4}-${{ matrix.arch }}.dmg.sha256"
- name: Upload macOS bundle
uses: actions/upload-artifact@v4
with:
name: macos-release-artifacts
path: |
build/Albert-${{ github.ref_name }}-${{ matrix.arch }}.dmg
build/Albert-${{ github.ref_name }}-${{ matrix.arch }}.dmg.sha256
build/*.dmg
build/*.sha256
#appcast_item.txt
Relase:
Expand All @@ -158,10 +159,10 @@ jobs:
uses: actions/download-artifact@v4
with:
name: macos-release-artifacts

- name: list files
run: find .

- name: Upload
uses: softprops/action-gh-release@v1
with:
Expand All @@ -170,7 +171,7 @@ jobs:
build/Albert-${{ github.ref_name }}-amd64.dmg.sha256
build/Albert-${{ github.ref_name }}-x86_64.dmg
build/Albert-${{ github.ref_name }}-x86_64.dmg.sha256
# Appcast:
# needs: Relase
# if: startsWith(github.ref, 'refs/tags/')
Expand All @@ -185,7 +186,7 @@ jobs:

#- name: list files
# run: find .

#- run: sed -i -e '/<\/language>/r appcast_item.txt' src/appcast.xml

#- name: Push appcast
Expand All @@ -205,11 +206,11 @@ jobs:
dockerfile: [arch.Dockerfile, fedora.Dockerfile, ubuntu.Dockerfile]

steps:

- name: Checkout source code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Build docker test image
run: docker build . --file .docker/${{ matrix.dockerfile }}

0 comments on commit 6fac1de

Please sign in to comment.