-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from unfoldedcircle/public-release
Prepare public release
- Loading branch information
Showing
15 changed files
with
1,133 additions
and
233 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**/Cargo.toml' | ||
- '**/Cargo.lock' | ||
- '**/src/**' | ||
- '**/build.rs' | ||
- '.github/**/*.yml' | ||
pull_request: | ||
branches: [ main ] | ||
types: [ opened, synchronize, reopened ] | ||
|
||
env: | ||
DEBUG_OUTPUT: "true" | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
fmt: | ||
name: Rustfmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- name: Run rustfmt | ||
run: cargo fmt --all -- --check | ||
|
||
test: | ||
name: Test and clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install required libraries | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libswupdate-dev -y | ||
shell: bash | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: clippy | ||
|
||
- run: cargo test | ||
|
||
- name: Run clippy | ||
run: cargo clippy -- -D warnings | ||
|
||
build: | ||
name: Build release | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install required libraries | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libswupdate-dev -y | ||
shell: bash | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
# History of 200 should be more than enough to calculate commit count since last release tag. | ||
fetch-depth: 200 | ||
- name: Fetch all tags to determine version | ||
run: | | ||
git fetch origin +refs/tags/*:refs/tags/* | ||
APP_VERSION=$(git describe --match "v[0-9]*" --tags HEAD --always) | ||
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV | ||
echo "ARTIFACT_NAME=${{ env.APP_NAME }}-$APP_VERSION-${{ env.LINUX_ARTIFACT_SUFFIX }}" >> $GITHUB_ENV | ||
- name: Install toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Release build | ||
shell: bash | ||
run: cargo build --release | ||
|
||
release: | ||
name: GitHub release | ||
if: github.ref == 'refs/heads/main' || contains(github.ref, 'tags/v') | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Create Pre-Release | ||
uses: "marvinpinto/action-automatic-releases@latest" | ||
if: "!contains(github.ref, 'tags/v')" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "latest" | ||
prerelease: true | ||
title: "Development Build" | ||
|
||
- name: Create Release | ||
uses: "marvinpinto/action-automatic-releases@latest" | ||
if: "contains(github.ref, 'tags/v')" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
prerelease: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Cargo.lock | ||
/target/ | ||
/.cargo/ | ||
/.idea/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# SWUpdate client library wrapper Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## Unreleased | ||
|
||
### Added | ||
- Initial manual bindings to SWUpdate's [progress_ipc.h](https://github.com/sbabic/swupdate/blob/master/include/progress_ipc.h) | ||
and [network_ipc.h](https://github.com/sbabic/swupdate/blob/master/include/network_ipc.h) client APIs. | ||
- Rust wrapper for the progress interface with a simple example. |
This file was deleted.
Oops, something went wrong.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
fn main() { | ||
println!("cargo:rustc-link-lib=swupdate"); | ||
println!("cargo:rustc-link-lib=swupdate"); | ||
} |
Oops, something went wrong.