@@ -10,19 +10,10 @@ permissions:
1010
1111jobs :
1212 publish_crates :
13- name : Release Libraries
13+ name : Release
1414 runs-on : ubuntu-latest
1515 continue-on-error : true
1616 if : github.ref_type == 'tag'
17- strategy :
18- matrix :
19- include :
20- - crate : rinex
21- - crate : sp3
22- - crate : sinex
23- - crate : binex
24- - crate : ublox-rnx
25- - crate : rinex-cli
2617 steps :
2718 - name : Checkout
2819 uses : actions/checkout@v4
@@ -35,105 +26,32 @@ jobs:
3526 TOKEN : ${{ secrets.CRATES_IO_TOKEN }}
3627 run : |
3728 cargo login $TOKEN
38- cargo publish -p ${{ matrix.crate }} - -allow-dirty
29+ cargo publish --allow-dirty
3930
4031 build :
41- name : build
42- runs-on : ${{ matrix.os }}
43- continue-on-error : true
44- env :
45- CARGO : cargo
46- RUST_BACKTRACE : 1
47- strategy :
48- fail-fast : false
49- matrix :
50- include :
51- - build : linux
52- os : ubuntu-latest
53- rust : stable
54- target : x86_64-unknown-linux-gnu
55- - build : macos
56- os : macos-latest
57- rust : stable
58- target : x86_64-apple-darwin
59- - build : macos
60- os : macos-latest
61- rust : stable
62- target : aarch64-apple-darwin
63- - build : win64-msvc
64- os : windows-latest
65- rust : stable
66- target : x86_64-pc-windows-msvc
67-
6832 steps :
6933 - name : Checkout repository
7034 uses : actions/checkout@v4
7135
72- - name : Install Rust
73- uses : actions-rs/toolchain@v1
74- with :
75- toolchain : ${{ matrix.rust }}
76- target : ${{ matrix.target }}
77-
78- - name : UBX2RNX Dependencies
79- if : matrix.build == 'linux'
80- shell : bash
81- run : |
82- sudo apt-get update
83- sudo apt-get install -y libudev-dev
84-
85- - name : Build applications
86- shell : bash
87- run : |
88- CARGO_PROFILE_RELEASE_STRIP=symbols ${{ env.CARGO }} build \
89- --verbose \
90- --target ${{ matrix.target }} \
91- --all-features \
92- --release \
93- -p rinex-cli \
94- -p ublox-rnx
95- ls -lah target/${{ matrix.target }}/release
96- if [ "${{ matrix.os }}" = "windows-latest" ]; then
97- rinexcli="target/${{ matrix.target }}/release/rinex-cli.exe"
98- ubloxrnx="target/${{ matrix.target }}/release/ublox-rnx.exe"
99- else
100- rinexcli="target/${{ matrix.target }}/release/rinex-cli"
101- ubloxrnx="target/${{ matrix.target }}/release/ublox-rnx"
102- fi
103- echo "RNXCLI=$rinexcli" >> $GITHUB_ENV
104- echo "UBX2RNX=$ubloxrnx" >> $GITHUB_ENV
105-
10636 - name : Determine archive name
10737 shell : bash
10838 run : |
109- echo "ARCHIVE=rinex-${{ github.ref_name }}-${{ matrix.target }} " >> $GITHUB_ENV
39+ echo "ARCHIVE=rinex-${{ github.ref_name }}" >> $GITHUB_ENV
11040
11141 - name : Creating directory for archive
11242 shell : bash
11343 run : |
11444 mkdir -p "$ARCHIVE"
115- cp {README.md,LICENSE-MIT,LICENSE-APACHE} "$ARCHIVE"/
116- cp "$RNXCLI" "$ARCHIVE"/
117- cp "$UBX2RNX" "$ARCHIVE"/
45+ cp {README.md,LICENSE} "$ARCHIVE"
11846
11947 - name : Gzip archive (Unix)
12048 shell : bash
121- if : matrix.os != 'windows-latest'
12249 run : |
12350 tar czf "$ARCHIVE.tar.gz" "$ARCHIVE"
12451 shasum -a 256 "$ARCHIVE.tar.gz" > "$ARCHIVE.tar.gz.sha256"
12552 echo "ASSET=$ARCHIVE.tar.gz" >> $GITHUB_ENV
12653 echo "ASSET_SUM=$ARCHIVE.tar.gz.sha256" >> $GITHUB_ENV
12754
128- - name : Zip archive (Windows)
129- shell : bash
130- if : matrix.os == 'windows-latest'
131- run : |
132- 7z a "$ARCHIVE.zip" "$ARCHIVE"
133- certutil -hashfile "$ARCHIVE.zip" SHA256 > "$ARCHIVE.zip.sha256"
134- echo "ASSET=$ARCHIVE.zip" >> $GITHUB_ENV
135- echo "ASSET_SUM=$ARCHIVE.zip.sha256" >> $GITHUB_ENV
136-
13755 - name : Upload artifacts
13856 uses : actions/upload-artifact@v3
13957 with :
@@ -165,122 +83,17 @@ jobs:
16583 tag_name : ${{ github.ref_name }}
16684 release_name : ${{ github.ref_name }}
16785
168- - name : Download x86_64-unknown-linux-gnu
169- uses : actions/download-artifact@v3
170- with :
171- name : rinex-${{ github.ref_name }}-x86_64-unknown-linux-gnu.tar.gz
172-
173- - name : Download x86_64-unknown-linux-gnu (cksum)
174- uses : actions/download-artifact@v3
175- with :
176- name : rinex-${{ github.ref_name }}-x86_64-unknown-linux-gnu.tar.gz.sha256
177-
178- - name : Upload x86_64-unknown-linux-gnu
179- uses : actions/upload-release-asset@v1
180- env :
181- GITHUB_TOKEN : ${{ github.token }}
182- with :
183- upload_url : ${{ steps.create_release.outputs.upload_url }}
184- asset_path : rinex-${{ github.ref_name }}-x86_64-unknown-linux-gnu.tar.gz
185- asset_name : rinex-${{ github.ref_name }}-x86_64-unknown-linux-gnu.tar.gz
186- asset_content_type : application/gzip
187-
188- - name : Upload x86_64-unknown-linux-gnu (cksum)
189- uses : actions/upload-release-asset@v1
190- env :
191- GITHUB_TOKEN : ${{ github.token }}
192- with :
193- upload_url : ${{ steps.create_release.outputs.upload_url }}
194- asset_path : rinex-${{ github.ref_name }}-x86_64-unknown-linux-gnu.tar.gz.sha256
195- asset_name : rinex-${{ github.ref_name }}-x86_64-unknown-linux-gnu.tar.gz.sha256
196- asset_content_type : application/gzip
197-
198- - name : Download x86_64-apple-darwin
199- uses : actions/download-artifact@v3
200- with :
201- name : rinex-${{ github.ref_name }}-x86_64-apple-darwin.tar.gz
202-
203- - name : Download x86_64-apple-darwin (cksum)
204- uses : actions/download-artifact@v3
205- with :
206- name : rinex-${{ github.ref_name }}-x86_64-apple-darwin.tar.gz.sha256
207-
208- - name : Upload x86_64-apple-darwin
209- uses : actions/upload-release-asset@v1
210- env :
211- GITHUB_TOKEN : ${{ github.token }}
212- with :
213- upload_url : ${{ steps.create_release.outputs.upload_url }}
214- asset_path : rinex-${{ github.ref_name }}-x86_64-apple-darwin.tar.gz
215- asset_name : rinex-${{ github.ref_name }}-x86_64-apple-darwin.tar.gz
216- asset_content_type : application/gzip
217-
218- - name : Upload x86_64-apple-darwin (cksum)
219- uses : actions/upload-release-asset@v1
220- env :
221- GITHUB_TOKEN : ${{ github.token }}
222- with :
223- upload_url : ${{ steps.create_release.outputs.upload_url }}
224- asset_path : rinex-${{ github.ref_name }}-x86_64-apple-darwin.tar.gz.sha256
225- asset_name : rinex-${{ github.ref_name }}-x86_64-apple-darwin.tar.gz.sha256
226- asset_content_type : application/gzip
227-
228- - name : Download aarch64-apple-darwin
86+ - name : Download Artifact
22987 uses : actions/download-artifact@v3
23088 with :
231- name : rinex-${{ github.ref_name }}-aarch64-apple-darwin.tar.gz
89+ name : rinex-${{ github.ref_name }}
23290
233- - name : Download aarch64-apple-darwin (cksum)
234- uses : actions/download-artifact@v3
235- with :
236- name : rinex-${{ github.ref_name }}-aarch64-apple-darwin.tar.gz.sha256
237-
238- - name : Upload aarch64-apple-darwin
239- uses : actions/upload-release-asset@v1
240- env :
241- GITHUB_TOKEN : ${{ github.token }}
242- with :
243- upload_url : ${{ steps.create_release.outputs.upload_url }}
244- asset_path : rinex-${{ github.ref_name }}-aarch64-apple-darwin.tar.gz
245- asset_name : rinex-${{ github.ref_name }}-aarch64-apple-darwin.tar.gz
246- asset_content_type : application/gzip
247-
248- - name : Upload aarch64-apple-darwin (cksum)
91+ - name : Upload asset
24992 uses : actions/upload-release-asset@v1
25093 env :
25194 GITHUB_TOKEN : ${{ github.token }}
25295 with :
25396 upload_url : ${{ steps.create_release.outputs.upload_url }}
254- asset_path : rinex-${{ github.ref_name }}-aarch64-apple-darwin.tar.gz.sha256
255- asset_name : rinex-${{ github.ref_name }}-aarch64-apple-darwin.tar.gz.sha256
97+ asset_path : rinex-${{ github.ref_name }}
98+ asset_name : rinex-${{ github.ref_name }}
25699 asset_content_type : application/gzip
257-
258- - name : Download x86_64-pc-windows-msvc
259- uses : actions/download-artifact@v3
260- with :
261- name : rinex-${{ github.ref_name }}-x86_64-pc-windows-msvc.zip
262-
263- - name : Download x86_64-pc-windows-msvc (cksum)
264- uses : actions/download-artifact@v3
265- with :
266- name : rinex-${{ github.ref_name }}-x86_64-pc-windows-msvc.zip.sha256
267-
268- - name : Upload x86_64-pc-windows-msvc
269- uses : actions/upload-release-asset@v1
270- env :
271- GITHUB_TOKEN : ${{ github.token }}
272- with :
273- upload_url : ${{ steps.create_release.outputs.upload_url }}
274- asset_path : rinex-${{ github.ref_name }}-x86_64-pc-windows-msvc.zip
275- asset_name : rinex-${{ github.ref_name }}-x86_64-pc-windows-msvc.zip
276- asset_content_type : application/zip
277-
278- - name : Upload x86_64-pc-windows-msvc (cksum)
279- uses : actions/upload-release-asset@v1
280- env :
281- GITHUB_TOKEN : ${{ github.token }}
282- with :
283- upload_url : ${{ steps.create_release.outputs.upload_url }}
284- asset_path : rinex-${{ github.ref_name }}-x86_64-pc-windows-msvc.zip.sha256
285- asset_name : rinex-${{ github.ref_name }}-x86_64-pc-windows-msvc.zip.sha256
286- asset_content_type : application/zip
0 commit comments