Skip to content

Commit

Permalink
chore: merge release-v0.2.8 into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjackwills committed Nov 17, 2023
2 parents 36d1a00 + d00b81d commit b8b8aa2
Show file tree
Hide file tree
Showing 14 changed files with 388 additions and 325 deletions.
25 changes: 12 additions & 13 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
ARG VARIANT="bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}

RUN printf "alias cls='clear'\nalias ll='ls -l --human-readable --color=auto --group-directories-first --classify --time-style=long-iso -all'" >> /etc/bash.bashrc

ENV PATH="/home/vscode/.cargo/bin:${PATH}"

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends build-essential pkg-config libssl-dev

USER vscode
RUN curl --proto '=https' --tlsv1.2 -sSf curl https://sh.rustup.rs | sh -s -- -y
# RUN rustup target add x86_64-unknown-linux-musl
ARG VARIANT="bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}

RUN printf "alias cls='clear'\nalias ll='ls -l --human-readable --color=auto --group-directories-first --classify --time-style=long-iso -all'" >> /etc/bash.bashrc

ENV PATH="/home/vscode/.cargo/bin:${PATH}"

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends build-essential pkg-config nmap

USER vscode
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
127 changes: 64 additions & 63 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,65 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.217.4/containers/rust
{
"name": "Rust",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Use the VARIANT arg to pick a Debian OS version: buster, bullseye
// Use bullseye when on local on arm64/Apple Silicon.
"VARIANT": "bullseye"
}
},
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],

"postCreateCommand": "cargo install cross typos-cli",

"mounts": [
"source=/etc/timezone,target=/etc/timezone,type=bind,readonly"
],

"customizations": {
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"bmuskalla.vscode-tldr",
"christian-kohler.path-intellisense",
"ms-vscode.live-server",
"mutantdino.resourcemonitor",
"rangav.vscode-thunder-client",
"rust-lang.rust-analyzer",
"serayuzgur.crates",
"tamasfe.even-better-toml",
"timonwong.shellcheck",
"vadimcn.vscode-lldb"
],

// Set *default* container specific settings.json values on container create.
"settings": {
"lldb.executable": "/usr/bin/lldb",
// VS Code don't watch files under ./target
"files.watcherExclude": {
"**/target/**": true
},
"rust-analyzer.checkOnSave.command": "clippy"
}
}
},
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest",
"moby": true,
"dockerDashComposeVersion":"v2"
},
"ghcr.io/devcontainers/features/git:1": {
"version":"os-provided"
}
}
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.217.4/containers/rust
{
"name": "Rust",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Use the VARIANT arg to pick a Debian OS version: buster, bullseye
// Use bullseye when on local on arm64/Apple Silicon.
"VARIANT": "bullseye"
}
},
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],

"postCreateCommand": "cargo install cross typos-cli",

"mounts": [
"source=/etc/timezone,target=/etc/timezone,type=bind,readonly"
],

"customizations": {
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"bmuskalla.vscode-tldr",
"christian-kohler.path-intellisense",
"ms-vscode.live-server",
"mutantdino.resourcemonitor",
"rangav.vscode-thunder-client",
"redhat.vscode-yaml",
"rust-lang.rust-analyzer",
"serayuzgur.crates",
"tamasfe.even-better-toml",
"timonwong.shellcheck",
"vadimcn.vscode-lldb"
],

// Set *default* container specific settings.json values on container create.
"settings": {
"lldb.executable": "/usr/bin/lldb",
// VS Code don't watch files under ./target
"files.watcherExclude": {
"**/target/**": true
},
"rust-analyzer.checkOnSave.command": "clippy"
}
}
},
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest",
"moby": true,
"dockerDashComposeVersion":"v2"
},
"ghcr.io/devcontainers/features/git:1": {
"version":"os-provided"
}
}
}
4 changes: 1 addition & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
*.sh eol=lf
*.md eol=CRLF
*.txt eol=lf
* eol=lf
20 changes: 9 additions & 11 deletions .github/release-body.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
### 2023-09-24
### 2023-11-17

### Chores
+ dependencies updated, [315c775a98a21272a0f9fd7b1ab189afa6a6eb45], [235e2eb436ad2e7114c8914cdfd33800c5fb51c4]

### Docs
+ README build for gnu, [7e0f1694f56a62b63931aa5762b7ef1dffe4894f]
+ dependencies updated, [a75ba8ab158009658f26394ce7361fcbfab892bb], [c978e98ef37d7f598d12cdb819569a44ceda5b9e]
+ Rust 1.74.0 linting, [9da794356bd6dd080619fb6661a99acc6643378d]
+ linting moved from main.rs to Cargot.toml, [c30163273ca8f69455690f46eb3be1b49a4aee2f]
+ .gitattributes updated, [c33cfb31201f3b261602b8e5342d066cd1cc31c7]
+ .devcontainer updated, [458385e81c9983d5d4de35da2716b2cd401df66a], [9e31ac43c6e18ac9e2ee5ca4c50cd3ce1c9ba6f8]
+ GitHub workflow use matrix build, [c560e09c0efed3374c9c1ea243c6dd1b5fd27842], [d5337113eee43667ce8099364f171cf843bb7883]
+ Rust 1.73.0 linting, [1aa2a554c4c2ddb9b8f210fef0fae9cdbb712a77]

### Fixes
+ remove camera deadlock, [5f1a06c44f5607fde3b9c4e571f1f38f93c2eb17]

### Refactors
+ improved systemd procedure, [6efa8213b5a469d99eaa1713b8b0650774f2c7b1]
+ systemd install error handling improvement, [1009893af32c69072afda20f545819d9692c439e]

+ systemd chown fix, [0b346ab5b89668d40e2bc8375cc789a1229231d3]


see <a href='https://github.com/mrjackwills/leafcast_pi/blob/main/CHANGELOG.md'>CHANGELOG.md</a> for more details
94 changes: 56 additions & 38 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,72 @@ on:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
deploy:
cross_platform_build:
strategy:
matrix:
platform:
- target: aarch64-unknown-linux-musl
- target: arm-unknown-linux-musleabihf
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v4

####################################
## Build binaries for release page #
####################################

# Install stable rust, and associated tools
- name: install rust
uses: dtolnay/rust-toolchain@stable

# Rust caching
- name: Rust cache
uses: swatinem/rust-cache@v2

# Install cross-rs
- name: install cross
run: cargo install cross --git https://github.com/cross-rs/cross

# Build for linux aarch64, aka 64 bit pi 4
- name: build aarch64-unknown-linux-musl
run: cross build --target aarch64-unknown-linux-musl --release
# Compress ouput into tar
- name: compress aarch64 binary
run: tar -C target/aarch64-unknown-linux-musl/release -czf ./leafcast_linux_aarch64.tar.gz leafcast

# Build for linux armv6, aka 32 bit pi zero w
- name: build arm-unknown-linux-musleabihf
run: cross build --target arm-unknown-linux-musleabihf --release
# Compress ouput into tar
- name: compress armv6 binary
run: tar -C target/arm-unknown-linux-musleabihf/release -czf ./leafcast_linux_armv6.tar.gz leafcast

###################
## Create release #
###################

- name: Release
uses: softprops/action-gh-release@v1
# Set env's
- name: set names
run: |
translate_platform() { case "$1" in aarch64-unknown-linux-musl) echo "aarch64.tar.gz";; arm-unknown-linux-musleabihf) echo "armv6.tar.gz";; *) echo "Error: Unsupported platform $1"; exit 1;; esac; }
target_platform="${{ matrix.platform.target }}"
output_name=$(translate_platform "$target_platform")
echo "TARGET_OUTPUT_NAME=${output_name}" >> $GITHUB_ENV
echo "TARGET_PLATFORM=${target_platform}" >> $GITHUB_ENV
# Build binary
- name: build
run: cross build --target "${TARGET_PLATFORM}" --release

# Compress, rename, and move
- name: compress
run: tar -C "target/${TARGET_PLATFORM}/release" -czf "./leafcast_${TARGET_OUTPUT_NAME}" leafcast

# Upload output for release page
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: ${{ env.TARGET_PLATFORM }}
path: leafcast_${{ env.TARGET_OUTPUT_NAME }}
retention-days: 1

###################
## Create release #
###################

create_release:
needs: [cross_platform_build]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup | Artifacts
uses: actions/download-artifact@v3

- name: Update Release
uses: ncipollo/release-action@v1
with:
tag_name: ${{ github.ref }}
makeLatest: true
name: ${{ github.ref_name }}
body_path: ".github/release-body.md"
draft: false
files: |
leafcast_linux_aarch64.tar.gz
leafcast_linux_armv6.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
bodyFile: ".github/release-body.md"
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: |
**/leafcast_*.tar.gz
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# <a href='https://github.com/mrjackwills/leafcast_pi/releases/tag/v0.2.8'>v0.2.8</a>
### 2023-11-17

### Chores
+ dependencies updated,[a75ba8ab](https://github.com/mrjackwills/leafcast_pi/commit/a75ba8ab158009658f26394ce7361fcbfab892bb),[c978e98e](https://github.com/mrjackwills/leafcast_pi/commit/c978e98ef37d7f598d12cdb819569a44ceda5b9e)
+ Rust 1.74.0 linting,[9da79435](https://github.com/mrjackwills/leafcast_pi/commit/9da794356bd6dd080619fb6661a99acc6643378d)
+ linting moved from main.rs to Cargot.toml,[c3016327](https://github.com/mrjackwills/leafcast_pi/commit/c30163273ca8f69455690f46eb3be1b49a4aee2f)
+ .gitattributes updated,[c33cfb31](https://github.com/mrjackwills/leafcast_pi/commit/c33cfb31201f3b261602b8e5342d066cd1cc31c7)
+ .devcontainer updated,[458385e8](https://github.com/mrjackwills/leafcast_pi/commit/458385e81c9983d5d4de35da2716b2cd401df66a),[9e31ac43](https://github.com/mrjackwills/leafcast_pi/commit/9e31ac43c6e18ac9e2ee5ca4c50cd3ce1c9ba6f8)
+ GitHub workflow use matrix build,[c560e09c](https://github.com/mrjackwills/leafcast_pi/commit/c560e09c0efed3374c9c1ea243c6dd1b5fd27842),[d5337113](https://github.com/mrjackwills/leafcast_pi/commit/d5337113eee43667ce8099364f171cf843bb7883)
+ Rust 1.73.0 linting,[1aa2a554](https://github.com/mrjackwills/leafcast_pi/commit/1aa2a554c4c2ddb9b8f210fef0fae9cdbb712a77)

### Fixes
+ systemd chown fix,[0b346ab5](https://github.com/mrjackwills/leafcast_pi/commit/0b346ab5b89668d40e2bc8375cc789a1229231d3)

# <a href='https://github.com/mrjackwills/leafcast_pi/releases/tag/v0.2.7'>v0.2.7</a>
### 2023-09-24

Expand Down
Loading

0 comments on commit b8b8aa2

Please sign in to comment.