Skip to content

Commit 3e14cda

Browse files
committed
workflow: add macos release and update everywhere the version
1 parent 75530c5 commit 3e14cda

4 files changed

Lines changed: 113 additions & 26 deletions

File tree

.github/workflows/release.yml

Lines changed: 100 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
echo "Tag name from github.ref_name: ${{ github.ref_name }}"
2222
echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT
2323
24-
build-tar:
24+
build-linux-tar:
2525
runs-on: ubuntu-22.04
2626
permissions:
2727
contents: read
@@ -32,10 +32,10 @@ jobs:
3232
- name: Install Packages
3333
run: |
3434
sudo apt-get update && sudo apt upgrade -y
35-
sudo apt-get install build-essential g++-11 libwayland-dev gettext pkg-config libarchive-tools libdconf-dev libglib2.0-dev -y
35+
sudo apt-get install build-essential g++-11 libwayland-dev gettext libgtk-3-dev pkg-config libdconf-dev libglib2.0-dev libgtkmm-3.0-dev libarchive-tools -y
3636
3737
- name: Clean
38-
run: make clean
38+
run: make distclean
3939

4040
- name: Compile
4141
run: make DEBUG=0 GUI_APP=0 CXX=x86_64-linux-gnu-g++-11
@@ -46,10 +46,10 @@ jobs:
4646
- name: Upload to github artifacts
4747
uses: actions/upload-artifact@v4
4848
with:
49-
name: customfetch
49+
name: customfetch-linux
5050
path: ./customfetch.tar.gz
5151

52-
build-gui-tar:
52+
build-linux-tar-gui:
5353
runs-on: ubuntu-22.04
5454
permissions:
5555
contents: read
@@ -74,7 +74,7 @@ jobs:
7474
- name: Upload to github artifacts
7575
uses: actions/upload-artifact@v4
7676
with:
77-
name: customfetch-gui
77+
name: customfetch-gui-linux
7878
path: ./customfetch-gui.tar.gz
7979

8080
build-deb:
@@ -95,7 +95,7 @@ jobs:
9595
sudo apt-get install binutils gettext lintian debhelper devscripts debmake autoconf automake autotools-dev dh-make fakeroot xutils pbuilder -y
9696
9797
- name: Clean
98-
run: make clean
98+
run: make distclean
9999

100100
- name: Create deb
101101
run: |
@@ -132,7 +132,7 @@ jobs:
132132
sudo apt-get install binutils lintian debhelper gettext devscripts debmake autoconf automake autotools-dev dh-make fakeroot xutils pbuilder -y
133133
134134
- name: Clean
135-
run: make clean
135+
run: make distclean
136136

137137
- name: Create deb
138138
run: |
@@ -152,9 +152,78 @@ jobs:
152152
name: customfetch-gui-deb-pkg
153153
path: /tmp/customfetch-2.0.0-beta1.orig/customfetch-gui_amd64.deb
154154

155+
build-macos-tar:
156+
runs-on: macos-latest
157+
permissions:
158+
contents: read
159+
160+
steps:
161+
- uses: actions/checkout@v4
162+
163+
- name: Install the packages
164+
run: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install --overwrite fastfetch neofetch pkg-config tree llvm@19
165+
166+
- name: uname -a && clang++ --version
167+
run: uname -a && echo "\n" && $(brew --prefix llvm@19)/bin/clang++ --version
168+
169+
- name: Clean
170+
run: make distclean
171+
172+
- name: Compile and install
173+
run: |
174+
export CXX=$(brew --prefix llvm@19)/bin/clang++
175+
mkdir build && cd build
176+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DGUI_APP=0 -DCMAKE_INSTALL_PREFIX=../usr
177+
make
178+
make install
179+
cd ..
180+
tar -zcf ./customfetch.tar.gz usr/
181+
182+
- name: Upload to github artifacts
183+
uses: actions/upload-artifact@v4
184+
with:
185+
if-no-files-found: error
186+
name: customfetch-macos
187+
path: ./customfetch.tar.gz
188+
189+
build-macos-tar-gui:
190+
runs-on: macos-latest
191+
permissions:
192+
contents: read
193+
194+
steps:
195+
- uses: actions/checkout@v4
196+
197+
- name: Install the packages
198+
run: HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install --overwrite fastfetch neofetch tree pkg-config gtkmm3 llvm@19
199+
200+
- name: uname -a && clang++ --version
201+
run: uname -a && echo "\n" && $(brew --prefix llvm@19)/bin/clang++ --version
202+
203+
- name: Clean
204+
run: make distclean
205+
206+
- name: Compile and install
207+
run: |
208+
export CXX=$(brew --prefix llvm@19)/bin/clang++
209+
export PKG_CONFIG_PATH="$(brew --prefix)/lib/pkgconfig:$(brew --prefix)/opt/gtkmm3/lib/pkgconfig:$(brew --prefix)/opt/gtk+3/lib/pkgconfig"
210+
mkdir build && cd build
211+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DGUI_APP=1 -DCMAKE_INSTALL_PREFIX=../usr
212+
make
213+
make install
214+
cd ..
215+
tar -zcf ./customfetch-gui.tar.gz usr/
216+
217+
- name: Upload to github artifacts
218+
uses: actions/upload-artifact@v4
219+
with:
220+
if-no-files-found: error
221+
name: customfetch-macos-gui
222+
path: ./customfetch-gui.tar.gz
223+
155224
release:
156225
name: Create GitHub Release
157-
needs: [build-tar, build-gui-tar, build-deb-gui, build-deb, get-version]
226+
needs: [build-linux-tar, build-linux-tar-gui, build-macos-tar, build-macos-tar-gui, build-deb-gui, build-deb, get-version]
158227
runs-on: ubuntu-latest
159228
permissions:
160229
contents: write
@@ -189,17 +258,35 @@ jobs:
189258
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
190259
with:
191260
upload_url: ${{ needs.release.outputs.release-url }}
192-
asset_path: customfetch/customfetch.tar.gz
193-
asset_name: customfetch-${{ needs.get-version.outputs.version }}.tar.gz
261+
asset_path: customfetch-linux/customfetch.tar.gz
262+
asset_name: customfetch-linux-${{ needs.get-version.outputs.version }}.tar.gz
263+
asset_content_type: application/tar+gz
264+
265+
- uses: actions/upload-release-asset@v1
266+
env:
267+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
268+
with:
269+
upload_url: ${{ needs.release.outputs.release-url }}
270+
asset_path: customfetch-linux-gui/customfetch-gui.tar.gz
271+
asset_name: customfetch-linux-gui-${{ needs.get-version.outputs.version }}.tar.gz
272+
asset_content_type: application/tar+gz
273+
274+
- uses: actions/upload-release-asset@v1
275+
env:
276+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
277+
with:
278+
upload_url: ${{ needs.release.outputs.release-url }}
279+
asset_path: customfetch-macos/customfetch.tar.gz
280+
asset_name: customfetch-macos-${{ needs.get-version.outputs.version }}.tar.gz
194281
asset_content_type: application/tar+gz
195282

196283
- uses: actions/upload-release-asset@v1
197284
env:
198285
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
199286
with:
200287
upload_url: ${{ needs.release.outputs.release-url }}
201-
asset_path: customfetch-gui/customfetch-gui.tar.gz
202-
asset_name: customfetch-gui-${{ needs.get-version.outputs.version }}.tar.gz
288+
asset_path: customfetch-macos-gui/customfetch-gui.tar.gz
289+
asset_name: customfetch-maacos-gui-${{ needs.get-version.outputs.version }}.tar.gz
203290
asset_content_type: application/tar+gz
204291

205292
- uses: actions/upload-release-asset@v1

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ add_library(cufetch SHARED
174174
)
175175

176176
set_target_properties(cufetch PROPERTIES
177-
VERSION 1.0.0
178-
SOVERSION 1
177+
VERSION 2.0.0-beta1
178+
SOVERSION 2
179179
OUTPUT_NAME "cufetch"
180180
POSITION_INDEPENDENT_CODE ON
181181
)
@@ -199,7 +199,7 @@ set(APPPREFIX "${CMAKE_INSTALL_PREFIX}/share/applications" CACHE PATH "Applicati
199199
set(LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale" CACHE PATH "Locale files directory")
200200
set(ICONPREFIX "${CMAKE_INSTALL_PREFIX}/share/pixmaps" CACHE PATH "Icon installation directory")
201201
target_compile_definitions(${TARGET_NAME} PRIVATE
202-
VERSION="1.0.0"
202+
VERSION="2.0.0-beta1"
203203
MANPREFIX="${MANPREFIX}"
204204
APPPREFIX="${APPPREFIX}"
205205
LOCALEDIR="${LOCALEDIR}"
@@ -258,10 +258,10 @@ install(DIRECTORY ${CMAKE_SOURCE_DIR}/locale/
258258

259259
install(CODE "
260260
execute_process(
261-
COMMAND ${CMAKE_COMMAND} -E create_symlink libcufetch.so.1 ${CMAKE_INSTALL_PREFIX}/lib/libcufetch.so
261+
COMMAND ${CMAKE_COMMAND} -E create_symlink libcufetch.so.2 ${CMAKE_INSTALL_PREFIX}/lib/libcufetch.so
262262
)
263263
execute_process(
264-
COMMAND ${CMAKE_COMMAND} -E create_symlink libcufetch.so.1.0.0 ${CMAKE_INSTALL_PREFIX}/lib/libcufetch.so.1
264+
COMMAND ${CMAKE_COMMAND} -E create_symlink libcufetch.so.2.0.0 ${CMAKE_INSTALL_PREFIX}/lib/libcufetch.so.2
265265
)
266266
")
267267

libcufetch/Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ ifeq ($(UNAME_S),Darwin)
77
SHARED_FLAG := -dynamiclib
88
SONAME_FLAGS :=
99
else
10-
LIBNAME := libcufetch.so.1.0.0
11-
INSTALL_NAME := -Wl,-soname,libcufetch.so.1
10+
LIBNAME := libcufetch.so.2.0.0
11+
INSTALL_NAME := -Wl,-soname,libcufetch.so.2
1212
SHARED_FLAG := -shared
1313
SONAME_FLAGS := -Wl,--export-dynamic
1414
endif
@@ -23,11 +23,11 @@ CXXFLAGS += -fvisibility-inlines-hidden -fvisibility=hidden -std=$(CXXSTD) -I..
2323

2424
all: $(OUTPUT)
2525
@if [ "$(UNAME_S)" = "Linux" ]; then \
26-
ln -sf libcufetch.so.1.0.0 ../$(BUILDDIR)/libcufetch.so.1; \
27-
ln -sf libcufetch.so.1.0.0 ../$(BUILDDIR)/libcufetch.so; \
26+
ln -sf libcufetch.so.2.0.0 ../$(BUILDDIR)/libcufetch.so.2; \
27+
ln -sf libcufetch.so.2.0.0 ../$(BUILDDIR)/libcufetch.so; \
2828
elif [ "$(UNAME_S)" = "Darwin" ]; then \
29-
ln -sf libcufetch.dylib ../$(BUILDDIR)/libcufetch.1.dylib; \
30-
ln -sf libcufetch.dylib ../$(BUILDDIR)/libcufetch.1.0.0.dylib; \
29+
ln -sf libcufetch.dylib ../$(BUILDDIR)/libcufetch.2.dylib; \
30+
ln -sf libcufetch.dylib ../$(BUILDDIR)/libcufetch.2.0.0.dylib; \
3131
fi
3232

3333
%.o: %.cc

tests/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ TEST_DIR = .
5151

5252
NAME = customfetch
5353
TARGET ?= $(NAME)
54-
OLDVERSION = 0.10.2
55-
VERSION = 1.0.0
54+
OLDVERSION = 1.0.0
55+
VERSION = 2.0.0-beta1
5656
SRC = $(filter-out $(SRC_DIR)/main.cpp, $(wildcard $(SRC_DIR)/*.cpp $(SRC_DIR)/query/linux/*.cpp $(SRC_DIR)/query/android/*.cpp $(SRC_DIR)/query/macos/*.cpp $(SRC_DIR)/query/linux/utils/*.cpp))
5757
OBJ = $(patsubst $(SRC_DIR)/%.cpp, $(BUILDDIR)/%.o, $(SRC))
5858
TESTS = $(patsubst $(TEST_DIR)/%.cpp, $(TEST_DIR)/%, $(wildcard $(TEST_DIR)/test*.cpp))

0 commit comments

Comments
 (0)