refactor(ci): enable Linux do-nothing GUI builds (but not tests) in CI/CD, extract scripts for that (#3735)

Builds a do-nothing `return 0` Linux client to make sure the CI/CD
scripts are set up and producing AppImage / deb bundles as expected.


![image](https://github.com/firezone/firezone/assets/13400041/7d2d8f02-adde-4b1b-89ec-02aaf112ac48)

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
This commit is contained in:
Reactor Scram
2024-02-23 11:57:39 -06:00
committed by GitHub
parent 7825710a69
commit fd31152106
8 changed files with 162 additions and 65 deletions

View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -euo pipefail
# For debugging
ls ../target/release ../target/release/bundle/appimage ../target/release/bundle/deb
# Used for release artifact
# In release mode the name comes from tauri.conf.json
# Using a glob for the source, there will only be one exe, AppImage, and deb anyway
cp ../target/release/firezone "$BINARY_DEST_PATH"-amd64
cp ../target/release/bundle/appimage/*_amd64.AppImage "$BINARY_DEST_PATH"_amd64.AppImage
cp ../target/release/bundle/deb/*_amd64.deb "$BINARY_DEST_PATH"_amd64.deb
# TODO: Debug symbols for Linux
function make_hash() {
sha256sum "$1"> "$1.sha256sum.txt"
}
# I think we agreed in standup to just match platform conventions
# Firezone for Windows is "-x64" which I believe is Visual Studio's convention
# Debian calls it "amd64". Rust and Linux call it "x86_64". So whatever, it's
# amd64 here. They're all the same.
make_hash "$BINARY_DEST_PATH"-amd64
make_hash "$BINARY_DEST_PATH"_amd64.AppImage
make_hash "$BINARY_DEST_PATH"_amd64.deb

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -euo pipefail
# For debugging
ls ../target/release ../target/release/bundle/msi
# Used for release artifact
# In release mode the name comes from tauri.conf.json
# Using a glob for the source, there will only be one exe, msi, and pdb anyway
cp ../target/release/*.exe "$BINARY_DEST_PATH-x64.exe"
cp ../target/release/bundle/msi/*.msi "$BINARY_DEST_PATH-x64.msi"
cp ../target/release/*.pdb "$BINARY_DEST_PATH-x64.pdb"
function make_hash() {
sha256sum "$1"> "$1.sha256sum.txt"
}
make_hash "$BINARY_DEST_PATH-x64.exe"
make_hash "$BINARY_DEST_PATH-x64.msi"
make_hash "$BINARY_DEST_PATH-x64.pdb"

View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail
# This artifact name is tied to the update checker in `gui-client/src-tauri/src/client/updates.rs`
gh release upload "$TAG_NAME" \
"$BINARY_DEST_PATH"_amd64.AppImage \
"$BINARY_DEST_PATH"_amd64.AppImage.sha256sum.txt \
"$BINARY_DEST_PATH"_amd64.deb \
"$BINARY_DEST_PATH"_amd64.deb.sha256sum.txt \
--clobber \
--repo "$REPOSITORY"

View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
# This artifact name is tied to the update checker in `gui-client/src-tauri/src/client/updates.rs`
gh release upload "$TAG_NAME" \
"$BINARY_DEST_PATH"-x64.msi \
"$BINARY_DEST_PATH"-x64.msi.sha256sum.txt \
--clobber \
--repo "$REPOSITORY"