Skip to content

Commit 983fb20

Browse files
committed
distribute static executable on linux
Update GitHub Actions workflow to use latest Ubuntu and improve Rust toolchain installation
1 parent cedfe3d commit 983fb20

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,26 @@ jobs:
1616
runs-on: ${{ matrix.os }}
1717
strategy:
1818
matrix:
19-
# Use an older ubuntu to compile with an older glibc
20-
os: [macos-latest, windows-latest, ubuntu-20.04]
19+
os: [macos-latest, windows-latest, ubuntu-latest]
2120
include:
2221
- os: windows-latest
2322
binary_path: target/superoptimized/sqlpage.exe
23+
target: x86_64-pc-windows-gnu
2424
- os: macos-latest
2525
binary_path: target/superoptimized/sqlpage
26-
- os: ubuntu-20.04
26+
target: x86_64-apple-darwin
27+
- os: ubuntu-latest
2728
binary_path: target/superoptimized/sqlpage
29+
target: x86_64-unknown-linux-musl
2830
steps:
29-
- run: rustup toolchain install stable --profile minimal
3031
- uses: actions/checkout@v4
32+
- name: Install Rust toolchain
33+
run: |
34+
rustup toolchain install --target ${{ matrix.target }} --profile minimal stable
3135
- name: Set up cargo cache
3236
uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f
33-
- run: cargo build --profile superoptimized --locked
37+
- name: Build
38+
run: cargo build --profile superoptimized --locked --target ${{ matrix.target }}
3439
- uses: actions/upload-artifact@v4
3540
with:
3641
name: sqlpage ${{ matrix.os }}
@@ -58,7 +63,7 @@ jobs:
5863
chmod +x sqlpage*/sqlpage;
5964
mv 'sqlpage macos-latest/sqlpage' sqlpage.bin;
6065
tar --create --file sqlpage-macos.tgz --gzip sqlpage.bin sqlpage/sqlpage.json sqlpage/migrations sqlpage/templates sqlpage/sqlpage.json;
61-
mv 'sqlpage ubuntu-20.04/sqlpage' sqlpage.bin;
66+
mv 'sqlpage ubuntu-latest/sqlpage' sqlpage.bin;
6267
tar --create --file sqlpage-linux.tgz --gzip sqlpage.bin sqlpage/migrations sqlpage/templates sqlpage/sqlpage.json;
6368
mv 'sqlpage windows-latest/sqlpage.exe' .
6469
zip -r sqlpage-windows.zip sqlpage.exe sqlpage/migrations sqlpage/templates sqlpage/sqlpage.json;

0 commit comments

Comments
 (0)