Skip to content

Commit

Permalink
attempt(1)
Browse files Browse the repository at this point in the history
  • Loading branch information
beltram.maldant committed Mar 7, 2021
1 parent 3c785f2 commit e98cd3f
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 112 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: security-audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
#name: security-audit
#on:
# push:
# paths:
# - '**/Cargo.toml'
# - '**/Cargo.lock'
#jobs:
# security_audit:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2.3.4
# - uses: actions-rs/audit-check@v1
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- uses: Swatinem/rust-cache@v1
- name: Coverage
uses: actions-rs/tarpaulin@v0.1
with:
args: --ignore-tests
- name: Upload to codecov.io
uses: codecov/codecov-action@v1
args: --ignore-tests --ciserver github-ci --coveralls ${{ secrets.COVERALLS_TOKEN }}
190 changes: 95 additions & 95 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,95 +1,95 @@
name: ci

on: [ push, pull_request ]

env:
CARGO_TERM_COLOR: always

jobs:
check:
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2.3.4
- uses: Swatinem/rust-cache@v1
- name: cargo/check
run: cargo check
- name: cargo/test
run: cargo test
- name: cargo/clippy
if: ${{ matrix.os == 'ubuntu-latest' }}
run: cargo clippy
release:
# runs on tags only
if: startsWith(github.ref, 'refs/tags/')
needs: [check]
strategy:
matrix:
include:
- os: ubuntu-latest
file: stubr
from-file: ./target/release/stubr
to-file: stubr-linux.tar.gz
args: --best --lzma
strip: true
- os: macos-latest
file: stubr
from-file: ./target/release/stubr
to-file: stubr-macos.tar.gz
args: --best
strip: true
- os: windows-latest
file: stubr.exe
from-file: ./target/release/stubr.exe
to-file: stubr-windows.zip
args: -9
strip: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2.3.4
- uses: Swatinem/rust-cache@v1
- name: cargo/build
run: cargo build --release
- name: upx
uses: svenstaro/upx-action@v2
with:
file: ${{ matrix.from-file }}
args: ${{ matrix.args }}
strip: ${{ matrix.strip }}
- name: compression/tar
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
run: |
cd target/release
tar czf ${{ matrix.to-file }} ${{ matrix.file }}
mv ${{ matrix.to-file }} ../..
- name: compression/zip
if: ${{ matrix.os == 'windows-latest' }}
run: |
cd target/release
7z a ${{ matrix.to-file }} ${{ matrix.file }}
mv ${{ matrix.to-file }} ../..
- name: release-binary
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ matrix.to-file }}
publish:
# runs on tags only
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: [release]
steps:
- uses: actions/checkout@v2.3.4
- uses: Swatinem/rust-cache@v1
- name: publish lib
run: |
cd lib
cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
- name: publish cli
run: |
cd cli
sleep 180
cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
#name: ci
#
#on: [ push, pull_request ]
#
#env:
# CARGO_TERM_COLOR: always
#
#jobs:
# check:
# strategy:
# matrix:
# os: [ macos-latest, windows-latest, ubuntu-latest ]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v2.3.4
# - uses: Swatinem/rust-cache@v1
# - name: cargo/check
# run: cargo check
# - name: cargo/test
# run: cargo test
# - name: cargo/clippy
# if: ${{ matrix.os == 'ubuntu-latest' }}
# run: cargo clippy
# release:
# # runs on tags only
# if: startsWith(github.ref, 'refs/tags/')
# needs: [check]
# strategy:
# matrix:
# include:
# - os: ubuntu-latest
# file: stubr
# from-file: ./target/release/stubr
# to-file: stubr-linux.tar.gz
# args: --best --lzma
# strip: true
# - os: macos-latest
# file: stubr
# from-file: ./target/release/stubr
# to-file: stubr-macos.tar.gz
# args: --best
# strip: true
# - os: windows-latest
# file: stubr.exe
# from-file: ./target/release/stubr.exe
# to-file: stubr-windows.zip
# args: -9
# strip: false
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v2.3.4
# - uses: Swatinem/rust-cache@v1
# - name: cargo/build
# run: cargo build --release
# - name: upx
# uses: svenstaro/upx-action@v2
# with:
# file: ${{ matrix.from-file }}
# args: ${{ matrix.args }}
# strip: ${{ matrix.strip }}
# - name: compression/tar
# if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
# run: |
# cd target/release
# tar czf ${{ matrix.to-file }} ${{ matrix.file }}
# mv ${{ matrix.to-file }} ../..
# - name: compression/zip
# if: ${{ matrix.os == 'windows-latest' }}
# run: |
# cd target/release
# 7z a ${{ matrix.to-file }} ${{ matrix.file }}
# mv ${{ matrix.to-file }} ../..
# - name: release-binary
# uses: softprops/action-gh-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# files: ${{ matrix.to-file }}
# publish:
# # runs on tags only
# if: startsWith(github.ref, 'refs/tags/')
# runs-on: ubuntu-latest
# needs: [release]
# steps:
# - uses: actions/checkout@v2.3.4
# - uses: Swatinem/rust-cache@v1
# - name: publish lib
# run: |
# cd lib
# cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
# - name: publish cli
# run: |
# cd cli
# sleep 180
# cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}

0 comments on commit e98cd3f

Please sign in to comment.