geforkt von mirrored/vaultwarden
update build actions
Dieser Commit ist enthalten in:
Ursprung
13eb276085
Commit
c1e39b182f
3 geänderte Dateien mit 119 neuen und 31 gelöschten Zeilen
46
.github/workflows/rust-linux.yml
gevendort
46
.github/workflows/rust-linux.yml
gevendort
|
@ -1,21 +1,37 @@
|
||||||
name: build-linux
|
name: build-linux
|
||||||
|
|
||||||
on: [push]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
db-backend: [sqlite, mysql, postgresql]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: install dependencies
|
- name: Install dependencies
|
||||||
run: sudo apt update && sudo apt install --no-install-recommends openssl ca-certificates curl sqlite3
|
run: sudo apt update && sudo apt install --no-install-recommends openssl sqlite3 libmysql++-dev
|
||||||
- name: Cache
|
|
||||||
|
- name: Cache cargo registry
|
||||||
|
uses: actions/cache@v1.0.3
|
||||||
|
with:
|
||||||
|
path: ~/.cargo/registry
|
||||||
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
- name: Cache cargo index
|
||||||
|
uses: actions/cache@v1.0.3
|
||||||
|
with:
|
||||||
|
path: ~/.cargo/git
|
||||||
|
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
- name: Cache cargo build
|
||||||
uses: actions/cache@v1.0.3
|
uses: actions/cache@v1.0.3
|
||||||
with:
|
with:
|
||||||
path: target
|
path: target
|
||||||
key: ${{ runner.os }}
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
- name: Install latest nightly
|
- name: Install latest nightly
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
@ -23,12 +39,24 @@ jobs:
|
||||||
override: true
|
override: true
|
||||||
profile: minimal
|
profile: minimal
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
- name: Build x86_64-unknown-linux-gnu
|
|
||||||
run: cargo build --verbose --features sqlite --release --target x86_64-unknown-linux-gnu
|
- name: Build
|
||||||
|
run: cargo build --verbose --features ${{ matrix.db-backend }} --release --target x86_64-unknown-linux-gnu
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --features sqlite
|
run: cargo test --features ${{ matrix.db-backend }}
|
||||||
|
|
||||||
- name: Upload linux artifact
|
- name: Upload linux artifact
|
||||||
uses: actions/upload-artifact@v1.0.0
|
uses: actions/upload-artifact@v1.0.0
|
||||||
with:
|
with:
|
||||||
name: x86_64-unknown-linux-gnu-bitwarden_rs
|
name: x86_64-unknown-linux-gnu-${{ matrix.db-backend }}-bitwarden_rs
|
||||||
path: target/x86_64-unknown-linux-gnu/release/bitwarden_rs
|
path: target/x86_64-unknown-linux-gnu/release/bitwarden_rs
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: Shopify/upload-to-release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
name: x86_64-unknown-linux-gnu-${{ matrix.db-backend }}-bitwarden_rs
|
||||||
|
path: target/x86_64-apple-darwin/release/bitwarden_rs
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
43
.github/workflows/rust-mac.yml
gevendort
43
.github/workflows/rust-mac.yml
gevendort
|
@ -1,19 +1,37 @@
|
||||||
name: build-mac
|
name: build-mac
|
||||||
|
|
||||||
on: [push]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
db-backend: [sqlite, mysql, postgresql]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Cache
|
- name: Install dependencies
|
||||||
|
run: brew install openssl sqlite mysql++
|
||||||
|
|
||||||
|
- name: Cache cargo registry
|
||||||
|
uses: actions/cache@v1.0.3
|
||||||
|
with:
|
||||||
|
path: ~/.cargo/registry
|
||||||
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
- name: Cache cargo index
|
||||||
|
uses: actions/cache@v1.0.3
|
||||||
|
with:
|
||||||
|
path: ~/.cargo/git
|
||||||
|
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
- name: Cache cargo build
|
||||||
uses: actions/cache@v1.0.3
|
uses: actions/cache@v1.0.3
|
||||||
with:
|
with:
|
||||||
path: target
|
path: target
|
||||||
key: ${{ runner.os }}
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
- name: Install latest nightly
|
- name: Install latest nightly
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
@ -21,10 +39,23 @@ jobs:
|
||||||
override: true
|
override: true
|
||||||
profile: minimal
|
profile: minimal
|
||||||
target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
- name: Build x86_64-apple-darwin
|
|
||||||
run: cargo build --verbose --features sqlite --release --target x86_64-apple-darwin
|
- name: Build
|
||||||
|
run: cargo build --verbose --features ${{ matrix.db-backend }} --release --target x86_64-apple-darwin
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: cargo test --features ${{ matrix.db-backend }}
|
||||||
|
|
||||||
- name: Upload macOS artifact
|
- name: Upload macOS artifact
|
||||||
uses: actions/upload-artifact@v1.0.0
|
uses: actions/upload-artifact@v1.0.0
|
||||||
with:
|
with:
|
||||||
name: x86_64-apple-darwin-bitwarden_rs
|
name: x86_64-apple-darwin-${{ matrix.db-backend }}-bitwarden_rs
|
||||||
path: target/x86_64-apple-darwin/release/bitwarden_rs
|
path: target/x86_64-apple-darwin/release/bitwarden_rs
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: Shopify/upload-to-release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
name: x86_64-apple-darwin-${{ matrix.db-backend }}-bitwarden_rs
|
||||||
|
path: target/x86_64-apple-darwin/release/bitwarden_rs
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
49
.github/workflows/rust-win.yml
gevendort
49
.github/workflows/rust-win.yml
gevendort
|
@ -1,31 +1,60 @@
|
||||||
name: build-windows
|
name: build-windows
|
||||||
|
|
||||||
on: [push]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
db-backend: [sqlite, mysql, postgresql]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: install dependencies
|
- name: Install dependencies
|
||||||
run: choco install sqlite openssl
|
run: choco install openssl sqlite
|
||||||
|
|
||||||
|
- name: Cache cargo registry
|
||||||
|
uses: actions/cache@v1.0.3
|
||||||
|
with:
|
||||||
|
path: ~/.cargo/registry
|
||||||
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
- name: Cache cargo index
|
||||||
|
uses: actions/cache@v1.0.3
|
||||||
|
with:
|
||||||
|
path: ~/.cargo/git
|
||||||
|
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
- name: Cache cargo build
|
||||||
|
uses: actions/cache@v1.0.3
|
||||||
|
with:
|
||||||
|
path: target
|
||||||
|
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
- name: Install latest nightly
|
- name: Install latest nightly
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: nightly
|
toolchain: nightly
|
||||||
override: true
|
override: true
|
||||||
profile: minimal
|
profile: minimal
|
||||||
- name: Cache
|
|
||||||
uses: actions/cache@v1.0.3
|
|
||||||
with:
|
|
||||||
path: target
|
|
||||||
key: ${{ runner.os }}
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo.exe build --verbose --features sqlite --release
|
run: cargo.exe build --verbose --features ${{ matrix.db-backend }} --release
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: cargo test --features ${{ matrix.db-backend }}
|
||||||
|
|
||||||
- name: Upload windows artifact
|
- name: Upload windows artifact
|
||||||
uses: actions/upload-artifact@v1.0.0
|
uses: actions/upload-artifact@v1.0.0
|
||||||
with:
|
with:
|
||||||
name: x86_64-pc-windows-bitwarden_rs
|
name: x86_64-pc-windows-${{ matrix.db-backend }}-bitwarden_rs
|
||||||
path: target/release/bitwarden_rs.exe
|
path: target/release/bitwarden_rs.exe
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: Shopify/upload-to-release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
name: x86_64-pc-windows-${{ matrix.db-backend }}-bitwarden_rs
|
||||||
|
path: target/release/bitwarden_rs.exe
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
Laden …
In neuem Issue referenzieren