2525 - " .github/workflows/build_linux.yml"
2626 push :
2727 branches : [master]
28+ tags : ["*"]
2829 paths :
2930 - " *.h"
3031 - " *.cpp"
4546 - " pyRF24/setup.py"
4647 - " pyRF24/pyRF24.cpp"
4748 - " .github/workflows/build_linux.yml"
48- release :
49- types : [created]
5049
5150env :
5251 # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
5352 BUILD_TYPE : Release
5453
54+ permissions : {}
55+
5556jobs :
5657
5758 # ###################### using Makefile #############################
@@ -100,6 +101,11 @@ jobs:
100101
101102 - name : provide pigpio
102103 if : ${{ matrix.config-options == '--driver=pigpio' }}
104+ env :
105+ # this env var is supported as of CMake v3.29+
106+ CMAKE_INSTALL_PREFIX : /usr/arm-linux-gnueabihf
107+ # this env var is supported as of CMake v3.21+
108+ CMAKE_TOOLCHAIN_FILE : ${{ github.workspace }}/cmake/toolchains/armhf.cmake
103109 run : |
104110 git clone https://github.com/joan2937/pigpio.git
105111 cd pigpio
@@ -108,8 +114,7 @@ jobs:
108114 git checkout $latestTag
109115 mkdir build
110116 cd build
111- cmake .. -D CMAKE_INSTALL_PREFIX=/usr/arm-linux-gnueabihf \
112- -D CMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/cmake/toolchains/armhf.cmake
117+ cmake ..
113118 make
114119 sudo make install
115120
@@ -118,22 +123,26 @@ jobs:
118123 env :
119124 CC : /usr/bin/arm-linux-gnueabihf-gcc
120125 CXX : /usr/bin/arm-linux-gnueabihf-g++
126+ # this env var is supported as of CMake v3.29+
127+ CMAKE_INSTALL_PREFIX : /usr/arm-linux-gnueabihf
128+ # this env var is supported as of CMake v3.21+
129+ CMAKE_TOOLCHAIN_FILE : ${{ github.workspace }}/cmake/toolchains/armhf.cmake
121130 run : |
122131 git clone https://github.com/intel-iot-devkit/mraa.git
123132 cd mraa
124133 mkdir build
125134 cd build
126135 cmake .. \
127136 -D BUILDSWIGNODE=OFF \
128- -D BUILDARCH=arm \
129- -D CMAKE_INSTALL_PREFIX=/usr/arm-linux-gnueabihf \
130- -D CMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/cmake/toolchains/armhf.cmake
137+ -D BUILDARCH=arm
131138 sudo make install
132139 sudo bash -c 'echo "/usr/local/lib/arm-linux-gnueabihf" >> /etc/ld.so.conf'
133140 sudo ldconfig
134141
135142 - name : library configure
136- run : ./configure ${{ matrix.config-options }}
143+ env :
144+ CONFIG_OPTIONS : ${{ matrix.config-options }}
145+ run : ./configure ${CONFIG_OPTIONS}
137146
138147 - name : library make
139148 run : make
@@ -150,14 +159,13 @@ jobs:
150159
151160 # ###################### using CMake ################################
152161 using_cmake :
153- uses : nRF24/.github/.github/workflows/build_linux_cmake.yaml@main
162+ uses : nRF24/.github/.github/workflows/build_linux_cmake.yaml@review-ci
154163 with :
155164 rf24-ref : ${{ github.sha }}
156165 driver : ${{ matrix.driver }}
157166 compiler : ${{ matrix.toolchain.compiler }}
158167 usr-dir : ${{ matrix.toolchain.usr_dir }}
159168 examples-path : examples_linux
160- deploy-release : ${{ github.event_name == 'release' && (matrix.toolchain.compiler == 'armhf' || matrix.toolchain.compiler == 'arm64') && (matrix.driver =='RPi' || matrix.driver =='SPIDEV') }}
161169 py-wrapper-path : pyRF24
162170 strategy :
163171 fail-fast : false
@@ -195,3 +203,11 @@ jobs:
195203 toolchain :
196204 compiler : " default" # github runner is hosted on a "amd64"
197205 usr_dir : " local"
206+
207+ deploy-release-assets :
208+ needs : [using_cmake]
209+ permissions :
210+ # needed for uploading release assets
211+ contents : write
212+ if : startsWith(github.ref, 'refs/tags/')
213+ uses : nRF24/.github/.github/workflows/deploy_cpack_artifacts.yaml@review-ci
0 commit comments