0.2.14 #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------------------------------------- | |
# Workflow configuration | |
#------------------------------------------------------------------------------- | |
name: "CLI CI builds (cmake)" | |
on: | |
release: | |
types: [published] | |
#------------------------------------------------------------------------------- | |
# Define application name & version | |
#------------------------------------------------------------------------------- | |
env: | |
APP_NAME: "WebSocketReflectorX" | |
APP_VERSION: "0.2.14" | |
#------------------------------------------------------------------------------- | |
# Workflow jobs | |
#------------------------------------------------------------------------------- | |
jobs: | |
## GNU/Linux build ########################################################### | |
build-linux: | |
name: "Linux CI build" | |
runs-on: ubuntu-22.04 | |
steps: | |
# Checkout repository (and submodules) | |
- name: Checkout repository (and submodules) | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# Install musl-gcc | |
- name: Install musl-gcc | |
run: sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install musl-tools musl-dev -y | |
# Setup Rust | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: x86_64-unknown-linux-musl | |
# Build Glibc application | |
- name: Build Glibc application | |
run: cargo build --release --features=binary | |
# Build musl application | |
- name: Build musl application | |
run: cargo build --release --features=binary --target x86_64-unknown-linux-musl | |
# Deploy Glibc application | |
- name: Compress Glibc Binaries | |
run: tar --transform='s!.*/!!' -cvf wsrx-cli-${{env.APP_VERSION}}-linux64-gnu.tar.gz target/release/wsrx | |
# Deploy musl application | |
- name: Compress musl Binaries | |
run: tar --transform='s!.*/!!' -cvf wsrx-cli-${{env.APP_VERSION}}-linux64-musl.tar.gz target/x86_64-unknown-linux-musl/release/wsrx | |
# Upload application ZIP | |
- name: Upload application ZIP | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wsrx-cli-${{env.APP_VERSION}}-linux64-gnu.tar.gz | |
path: wsrx-cli-${{env.APP_VERSION}}-linux64-gnu.tar.gz | |
# Upload application ZIP | |
- name: Upload application ZIP | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wsrx-cli-${{env.APP_VERSION}}-linux64-musl.tar.gz | |
path: wsrx-cli-${{env.APP_VERSION}}-linux64-musl.tar.gz | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
wsrx-cli-${{env.APP_VERSION}}-linux64-gnu.tar.gz | |
wsrx-cli-${{env.APP_VERSION}}-linux64-musl.tar.gz | |
## macOS build ############################################################### | |
build-mac: | |
name: "macOS CI build" | |
runs-on: macos-12 | |
steps: | |
# Checkout repository (and submodules) | |
- name: Checkout repository (and submodules) | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# Setup Rust | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
# Build application | |
- name: Build application | |
run: cargo build --release --features=binary | |
# Deploy application | |
- name: Compress Binaries | |
run: zip -r -y -X wsrx-cli-${{env.APP_VERSION}}-macOS-x86_64.zip target/release/wsrx | |
# Upload application ZIP | |
- name: Upload application ZIP | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wsrx-cli-${{env.APP_VERSION}}-macOS-x86_64.zip | |
path: wsrx-cli-${{env.APP_VERSION}}-macOS-x86_64.zip | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: wsrx-cli-${{env.APP_VERSION}}-macOS-x86_64.zip | |
## macOS build ############################################################### | |
build-mac-arm: | |
name: "macOS ARM CI build" | |
runs-on: macos-14 | |
steps: | |
# Checkout repository (and submodules) | |
- name: Checkout repository (and submodules) | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# Setup Rust | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
# Build application | |
- name: Build application | |
run: cargo build --release --features=binary | |
# Deploy application | |
- name: Compress Binaries | |
run: zip -r -y -X wsrx-cli-${{env.APP_VERSION}}-macOS-arm64.zip target/release/wsrx | |
# Upload application ZIP | |
- name: Upload application ZIP | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wsrx-cli-${{env.APP_VERSION}}-macOS-arm64.zip | |
path: wsrx-cli-${{env.APP_VERSION}}-macOS-arm64.zip | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: wsrx-cli-${{env.APP_VERSION}}-macOS-arm64.zip | |
## Windows build ############################################################# | |
build-windows: | |
name: "Windows CI build" | |
runs-on: windows-2022 | |
steps: | |
# Checkout repository (and submodules) | |
- name: Checkout repository (and submodules) | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# Setup Rust | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
# Build application | |
- name: Build application | |
run: cargo build --release --features=binary | |
# Deploy application | |
- name: Compress Binaries | |
run: 7z a wsrx-cli-${{env.APP_VERSION}}-win64.zip target/release/wsrx.exe | |
# Upload application ZIP | |
- name: Upload application ZIP | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wsrx-cli-${{env.APP_VERSION}}-win64.zip | |
path: wsrx-cli-${{env.APP_VERSION}}-win64.zip | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: wsrx-cli-${{env.APP_VERSION}}-win64.zip |