@@ -25,29 +25,14 @@ jobs:
2525 # Linux x86_64
2626 - os : ubuntu-latest
2727 target : x86_64-unknown-linux-gnu
28- archive : tar.gz
29-
30- # Linux ARM64
31- - os : ubuntu-latest
32- target : aarch64-unknown-linux-gnu
33- archive : tar.gz
34- cross : true
3528
3629 # macOS x86_64 (Intel)
3730 - os : macos-latest
3831 target : x86_64-apple-darwin
39- archive : tar.gz
4032
4133 # macOS ARM64 (Apple Silicon)
4234 - os : macos-latest
4335 target : aarch64-apple-darwin
44- archive : tar.gz
45-
46- # Windows x86_64
47- - os : windows-latest
48- target : x86_64-pc-windows-msvc
49- archive : zip
50- ext : .exe
5136
5237 steps :
5338 - name : Checkout code
5843 with :
5944 targets : ${{ matrix.target }}
6045
61- - name : Install cross (for cross-compilation)
62- if : matrix.cross
63- run : |
64- cargo install cross --git https://github.com/cross-rs/cross
65-
6646 - name : Cache cargo registry
6747 uses : actions/cache@v4
6848 with :
@@ -89,48 +69,31 @@ jobs:
8969
9070 - name : Build binaries
9171 run : |
92- if [ "${{ matrix.cross }}" == "true" ]; then
93- cross build --release --target ${{ matrix.target }} --bin tart-backend
94- cross build --release --target ${{ matrix.target }} --bin tart-dash
95- else
96- cargo build --release --target ${{ matrix.target }} --bin tart-backend
97- cargo build --release --target ${{ matrix.target }} --bin tart-dash
98- fi
99- shell : bash
72+ cargo build --release --target ${{ matrix.target }} --bin tart-backend
73+ cargo build --release --target ${{ matrix.target }} --bin tart-dash
10074
101- - name : Strip binaries (Unix)
102- if : runner.os != 'Windows'
75+ - name : Strip binaries
10376 run : |
10477 strip target/${{ matrix.target }}/release/tart-backend || true
10578 strip target/${{ matrix.target }}/release/tart-dash || true
10679
107- - name : Create archive (Unix)
108- if : matrix.archive == 'tar.gz'
109- run : |
110- cd target/${{ matrix.target }}/release
111- tar -czf ../../../tart-backend-${{ matrix.target }}.tar.gz tart-backend${{ matrix.ext }}
112- tar -czf ../../../tart-dash-${{ matrix.target }}.tar.gz tart-dash${{ matrix.ext }}
113-
114- - name : Create archive (Windows)
115- if : matrix.archive == 'zip'
116- shell : pwsh
80+ - name : Rename binaries with target suffix
11781 run : |
118- cd target/${{ matrix.target }}/release
119- Compress-Archive -Path tart-backend.exe -DestinationPath ../../../tart-backend-${{ matrix.target }}.zip
120- Compress-Archive -Path tart-dash.exe -DestinationPath ../../../tart-dash-${{ matrix.target }}.zip
82+ cp target/${{ matrix.target }}/release/tart-backend tart-backend-${{ matrix.target }}
83+ cp target/${{ matrix.target }}/release/tart-dash tart-dash-${{ matrix.target }}
12184
12285 - name : Upload backend artifact
12386 uses : actions/upload-artifact@v4
12487 with :
12588 name : tart-backend-${{ matrix.target }}
126- path : tart-backend-${{ matrix.target }}.${{ matrix.archive }}
89+ path : tart-backend-${{ matrix.target }}
12790 if-no-files-found : error
12891
12992 - name : Upload dashboard artifact
13093 uses : actions/upload-artifact@v4
13194 with :
13295 name : tart-dash-${{ matrix.target }}
133- path : tart-dash-${{ matrix.target }}.${{ matrix.archive }}
96+ path : tart-dash-${{ matrix.target }}
13497 if-no-files-found : error
13598
13699 release :
0 commit comments