Skip to content

Commit

Permalink
chore: update publish.yml, take 4
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed May 28, 2020
1 parent 45464f0 commit acf991b
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 67 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/macos-test.yml

This file was deleted.

44 changes: 20 additions & 24 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,32 @@ on:
- "*"

jobs:
build:
name: Publish binaries
runs-on: ubuntu-latest
container:
image: docker://debian:testing
publish:
name: Publish for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: pacaptr
asset_name: pacaptr-linux-amd64
- os: windows-latest
artifact_name: pacaptr.exe
asset_name: pacaptr-windows-amd64
- os: macos-latest
artifact_name: pacaptr
asset_name: pacaptr-macos-amd64

steps:
- name: Setup Common Build Tools
run: apt-get update && apt-get install -y curl build-essential

- name: Rust Environment Setup
uses: dtolnay/rust-toolchain@stable

- name: Cross Environment Setup
run: cargo install cross

- name: Checkout
uses: actions/checkout@v1

- uses: dtolnay/rust-toolchain@stable
- uses: actions/checkout@v1
- name: Build
run: cross build --release --target x86_64-apple-darwin --target-dir "./binaries/x86_64-apple-darwin/"

- name: Zip
run: tar czvf "pacaptr-x86_64-apple-darwin.tar.gz" -C "./binaries/x86_64-apple-darwin/" .

run: cargo build --release --locked
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: pacaptr-x86_64-apple-darwin.tar.gz
asset_name: pacaptr-x86_64-apple-darwin.tar.gz
file: target/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
overwrite: true
30 changes: 27 additions & 3 deletions .github/workflows/linux-test.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: linux-test
name: test

on:
push:
Expand All @@ -7,7 +7,31 @@ on:
branches: [master, rs-dev]

jobs:
debian-build:
windows-test:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run heavy tests
run: cargo test --verbose -- --ignored

macos-test:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run heavy tests
run: cargo test --verbose -- --ignored

debian-test:
runs-on: ubuntu-latest
container:
image: docker://debian:testing
Expand All @@ -25,7 +49,7 @@ jobs:
- name: Run heavy tests
run: cargo test dpkg --verbose -- --ignored

alpine-build:
alpine-test:
runs-on: ubuntu-latest
container:
image: docker://rust:alpine
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/windows-test.yml

This file was deleted.

0 comments on commit acf991b

Please sign in to comment.