Skip to content

Commit f230253

Browse files
Merge pull request #9 from OpenSmock/5-Include-Linux-and-MacOS-library-file
Setup mac and linux library
2 parents 7f422a7 + f53c4b1 commit f230253

File tree

4 files changed

+52
-8
lines changed

4 files changed

+52
-8
lines changed

.github/workflows/Pharo11CI.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,28 @@ jobs:
1414
build:
1515
strategy:
1616
matrix:
17-
os: [ windows-latest ]
17+
os: [ ubuntu-latest, macos-latest, windows-latest ]
1818
smalltalk: [ Pharo64-11 ]
1919
runs-on: ${{ matrix.os }}
2020
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
2121
steps:
2222
- uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0
25+
26+
#For ubuntu only
27+
- name: Install zmq library for Ubuntu
28+
if: matrix.os == 'ubuntu-latest'
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y libzmq3-dev
32+
33+
#For macos only
34+
- name: Install zmq library for MacOS
35+
if: matrix.os == 'macos-latest'
36+
run: |
37+
brew install zeromq
38+
2539
- uses: hpi-swa/setup-smalltalkCI@v1
2640
with:
2741
smalltalk-image: ${{ matrix.smalltalk }}

.github/workflows/Pharo12CI.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,28 @@ jobs:
1414
build:
1515
strategy:
1616
matrix:
17-
os: [ windows-latest ]
17+
os: [ ubuntu-latest, macos-latest, windows-latest ]
1818
smalltalk: [ Pharo64-12 ]
1919
runs-on: ${{ matrix.os }}
2020
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
2121
steps:
2222
- uses: actions/checkout@v3
2323
with:
2424
fetch-depth: 0
25+
26+
#For ubuntu only
27+
- name: Install zmq library for Ubuntu
28+
if: matrix.os == 'ubuntu-latest'
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y libzmq3-dev
32+
33+
#For macos only
34+
- name: Install zmq library for MacOS
35+
if: matrix.os == 'macos-latest'
36+
run: |
37+
brew install zeromq
38+
2539
- uses: hpi-swa/setup-smalltalkCI@v1
2640
with:
2741
smalltalk-image: ${{ matrix.smalltalk }}

.github/workflows/Pharo13CI.yml

+15-1
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,28 @@ jobs:
1414
build:
1515
strategy:
1616
matrix:
17-
os: [ windows-latest ]
17+
os: [ ubuntu-latest, macos-latest, windows-latest ]
1818
smalltalk: [ Pharo64-13 ]
1919
runs-on: ${{ matrix.os }}
2020
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
2121
steps:
2222
- uses: actions/checkout@v3
2323
with:
2424
fetch-depth: 0
25+
26+
#For ubuntu only
27+
- name: Install zmq library for Ubuntu
28+
if: matrix.os == 'ubuntu-latest'
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y libzmq3-dev
32+
33+
#For macos only
34+
- name: Install zmq library for MacOS
35+
if: matrix.os == 'macos-latest'
36+
run: |
37+
brew install zeromq
38+
2539
- uses: hpi-swa/setup-smalltalkCI@v1
2640
with:
2741
smalltalk-image: ${{ matrix.smalltalk }}

src/ZMQ/LibZMQ.class.st

+7-5
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,21 @@ LibZMQ class >> repositoryDirectory [
2727
^ myRepository location
2828
]
2929

30-
{ #category : #'accessing platform' }
30+
{ #category : #'accessing - platform' }
3131
LibZMQ >> macLibraryName [
3232

33-
^ (self class repositoryDirectory / 'include' / 'libzmq.dylib') asFileReference pathString
33+
"^ (self class repositoryDirectory / 'include' / 'libzmq.dylib') asFileReference pathString"
34+
^ FFIMacLibraryFinder findLibrary: 'libzmq.dylib'
3435
]
3536

36-
{ #category : #'accessing platform' }
37+
{ #category : #'accessing - platform' }
3738
LibZMQ >> unixLibraryName [
3839

39-
^ (self class repositoryDirectory / 'include' / 'libzmq.so') asFileReference pathString
40+
"^ (self class repositoryDirectory / 'include' / 'libzmq.so') asFileReference pathString"
41+
^ FFIUnix32LibraryFinder findLibrary: 'libzmq.so'
4042
]
4143

42-
{ #category : #'accessing platform' }
44+
{ #category : #'accessing - platform' }
4345
LibZMQ >> win32LibraryName [
4446

4547
^ (self class repositoryDirectory / 'include' / 'zmq.dll') asFileReference pathString

0 commit comments

Comments
 (0)