Skip to content

Commit

Permalink
custom
Browse files Browse the repository at this point in the history
  • Loading branch information
waltarix committed Jul 2, 2023
1 parent 2b1db8b commit 6454331
Show file tree
Hide file tree
Showing 21 changed files with 211 additions and 326 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/ci.yml

This file was deleted.

109 changes: 0 additions & 109 deletions .github/workflows/publish.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Release

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+-custom
- v[0-9]+.[0-9]+.[0-9]+-custom-r[0-9]+

permissions:
contents: write

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-22.04
rust-target: x86_64-unknown-linux-gnu
- os: macos-12
rust-target: x86_64-apple-darwin
- os: macos-12
rust-target: aarch64-apple-darwin
env:
xcode_version: 14.2
macosx_sdk: macosx13.1

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set RUST_TARGET
run: echo 'RUST_TARGET=${{ matrix.rust-target }}' >> $GITHUB_ENV

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: ${{ matrix.rust-target }}

- name: Setup Xcode for macOS
if: matrix.os == 'macos-12'
run: sudo xcode-select -s '/Applications/Xcode_${{ env.xcode_version }}.app'

- name: Set environment variables for Apple Silicon
if: matrix.rust-target == 'aarch64-apple-darwin'
run: |
export SDKROOT=$(xcrun -sdk ${{ env.macosx_sdk }} --show-sdk-path)
[[ -n $SDKROOT ]] && echo "SDKROOT=$SDKROOT" >> $GITHUB_ENV
export MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk ${{ env.macosx_sdk }} --show-sdk-platform-version)
[[ -n $MACOSX_DEPLOYMENT_TARGET ]] && echo "MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET" >> $GITHUB_ENV
- name: Build
run: make

- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: "*.tar.xz"
allowUpdates: true
116 changes: 0 additions & 116 deletions .github/workflows/test.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ lscolors = { version = "0.13.0", features = ["ansi_term"] }
once_cell = "1.17.0"
regex = "1.7.3"
thiserror = "1.0.40"
unicode-width = "0.1.10"

[target.'cfg(unix)'.dependencies]
libc = "0.2.141"
Expand All @@ -51,3 +52,12 @@ winapi = "0.3.9"
indoc = "2.0.0"
strip-ansi-escapes = "0.1.1"
tempfile = "3.4.0"

[profile.release]
codegen-units = 1
lto = true
strip = true
opt-level = 3

[patch.crates-io]
unicode-width = { git = "https://github.com/waltarix/unicode-width", tag = "v0.1.10-custom-r3" }
Loading

0 comments on commit 6454331

Please sign in to comment.