Skip to content

Commit

Permalink
Update dependencies. Migrate CICD pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kostassoid committed Jun 18, 2023
1 parent 28e3f41 commit d1cdf1b
Show file tree
Hide file tree
Showing 4 changed files with 357 additions and 175 deletions.
42 changes: 12 additions & 30 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: CI/CD

env:
RUST_VERSION: "1.64.0"
RUST_VERSION: "1.67.1"
OUTPUT_PATH: "_out"
CARGO_TERM_COLOR: always
CARGO: "cargo"

on:
workflow_dispatch:
Expand All @@ -17,14 +18,8 @@ on:
jobs:
fmt:
name: Ensure 'cargo fmt' has been run
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# default: true
# profile: minimal
# components: rustfmt
- uses: actions/checkout@v3
- run: cargo fmt -- --check

Expand All @@ -48,14 +43,13 @@ jobs:
run: |
echo "PROJECT_NAME=lethe" >> $GITHUB_ENV
echo "PROJECT_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV
echo "TARGET_FLAGS=--target ${{ matrix.job.target }}" >> $GITHUB_ENV
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.job.target }}
override: true
profile: minimal # minimal component installation (ie, no documentation)

- name: Show version information (Rust, cargo)
shell: bash
Expand All @@ -81,34 +75,22 @@ jobs:
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx12.1 --show-sdk-platform-version)" >> $GITHUB_ENV
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.job.use-cross }}
command: build
args: --locked --release --target=${{ matrix.job.target }}
run: ${{ env.CARGO }} build --locked --release ${{ env.TARGET_FLAGS }}

- name: Run tests
if: ${{ !matrix.job.skip-tests }}
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.job.use-cross }}
command: test
args: --locked --target=${{ matrix.job.target }}
run: ${{ env.CARGO }} test --locked ${{ env.TARGET_FLAGS }}

- name: Run app
if: ${{ !matrix.job.skip-tests }}
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.job.use-cross }}
command: run
args: --locked --target=${{ matrix.job.target }} -- --help
run: ${{ env.CARGO }} run --locked ${{ env.TARGET_FLAGS }} -- --help

- name: Check for release
id: is-release
shell: bash
run: |
unset IS_RELEASE ; if [[ $GITHUB_REF =~ ^refs/tags/v[0-9].* ]]; then IS_RELEASE='true' ; fi
echo ::set-output name=IS_RELEASE::${IS_RELEASE}
echo "IS_RELEASE=${IS_RELEASE}" >> "$GITHUB_OUTPUT"
- name: Create tarball
id: package
Expand All @@ -125,7 +107,7 @@ jobs:
PKG_suffix=".tar.gz" ; case ${{ matrix.job.target }} in *-pc-windows-*) PKG_suffix=".zip" ;; esac;
PKG_BASENAME=${PROJECT_NAME}-v${PROJECT_VERSION}-${{ matrix.job.target }}
PKG_NAME=${PKG_BASENAME}${PKG_suffix}
echo ::set-output name=PKG_NAME::${PKG_NAME}
echo "PKG_NAME=${PKG_NAME}" >> "$GITHUB_OUTPUT"
PKG_STAGING="${{ env.OUTPUT_PATH }}/package"
ARCHIVE_DIR="${PKG_STAGING}/${PKG_BASENAME}/"
Expand All @@ -143,7 +125,7 @@ jobs:
popd >/dev/null
# Let subsequent steps know where to find the compressed package
echo ::set-output name=PKG_PATH::"${PKG_STAGING}/${PKG_NAME}"
echo "PKG_PATH=${PKG_STAGING}/${PKG_NAME}" >> "$GITHUB_OUTPUT"
- name: "Artifact upload: tarball"
uses: actions/upload-artifact@master
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [Unreleased] - ReleaseDate

* Fixed known issues in external dependencies.

## [v0.8.0] - 2022-09-25

### Added
Expand Down
Loading

0 comments on commit d1cdf1b

Please sign in to comment.