Skip to content

Commit

Permalink
cargo build --features "openssl/vendored"
Browse files Browse the repository at this point in the history
update cargo.lock

cleanup workflow
  • Loading branch information
nbari committed Dec 15, 2023
1 parent bda32ad commit dd918b9
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 32 deletions.
36 changes: 11 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
name: Build
name: Test & Build

on:
push:
branches:
- develop
- '*'
workflow_dispatch:

permissions:
Expand All @@ -17,7 +17,7 @@ jobs:
branch: develop

build:
name: Build and release
name: Build
runs-on: ${{ matrix.os }}
needs: test

Expand Down Expand Up @@ -58,26 +58,12 @@ jobs:
$env:GITHUB_ENV -Append
if: matrix.build == 'windows'

- name: Build
run: cargo build --release --locked --target ${{ matrix.target }}

- name: Build archive
shell: bash
run: |-
binary_name="gbump"
dirname="$binary_name-${{ env.VERSION }}-${{ matrix.target }}"
mkdir "$dirname"
if [ "${{ matrix.os }}" = "windows-latest" ]; then
mv "target/${{ matrix.target }}/release/$binary_name.exe" "$dirname"
else
mv "target/${{ matrix.target }}/release/$binary_name" "$dirname"
fi
- name: Build Linux
run: |
cargo build --release --locked --target ${{ matrix.target }} --features "openssl/vendored"
if: matrix.build == 'linux'

if [ "${{ matrix.os }}" = "windows-latest" ]; then
7z a "$dirname.zip" "$dirname"
echo "ASSET=$dirname.zip" >> $GITHUB_ENV
else
tar -czf "$dirname.tar.gz" "$dirname"
echo "ASSET=$dirname.tar.gz" >> $GITHUB_ENV
fi
- name: Build
run: |
cargo build --release --locked --target ${{ matrix.target }}
if: matrix.build != 'linux'
9 changes: 8 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,15 @@ jobs:
$env:GITHUB_ENV -Append
if: matrix.build == 'windows'

- name: Build Linux
run: |
cargo build --release --locked --target ${{ matrix.target }} --features "openssl/vendored"
if: matrix.build == 'linux'

- name: Build
run: cargo build --release --locked --target ${{ matrix.target }}
run: |
cargo build --release --locked --target ${{ matrix.target }}
if: matrix.build != 'linux'

- name: Build archive
shell: bash
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ on:
required: true
type: string
default: develop
push:
branches:
- develop
- main
pull_request:
branches:
- '*'
Expand Down
100 changes: 99 additions & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ edition = "2018"
[dependencies]
regex = "1.8"
clap = "4"
openssl-sys = { version = "0.9", optional = true }
openssl = { version = "0.10", optional = true, features = ["vendored"] }
git2 = "0.18"

0 comments on commit dd918b9

Please sign in to comment.