Skip to content

Commit 128157b

Browse files
authored
Merge pull request #42 from learturely/worksoup-main
Update rust.yml
2 parents e34c21d + b2b10cb commit 128157b

File tree

1 file changed

+48
-3
lines changed

1 file changed

+48
-3
lines changed

.github/workflows/rust.yml

+48-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ name: Rust
1717

1818
on:
1919
push:
20-
branches: [ "main", "newsign" ]
20+
branches: [ "main" ]
2121
pull_request:
22-
branches: [ "main", "newsign" ]
22+
branches: [ "main" ]
2323

2424
env:
2525
CARGO_TERM_COLOR: always
@@ -39,8 +39,53 @@ jobs:
3939
with:
4040
toolchain: nightly
4141
override: true
42-
components: rustfmt, clippy
42+
components: clippy
4343
- name: Run cargo check
4444
uses: actions-rs/cargo@v1
4545
with:
4646
command: check
47+
- name: Run cargo clippy
48+
uses: actions-rs/cargo@v1
49+
with:
50+
command: clippy
51+
build:
52+
if: true
53+
needs: [ check ]
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
include:
58+
- { os: ubuntu-latest }
59+
- { os: windows-2022 }
60+
- { os: macos-12 }
61+
name: ${{ format('{0}', matrix.os) }}
62+
runs-on: ${{ matrix.os }}
63+
steps:
64+
- uses: actions/checkout@v2
65+
with:
66+
submodules: true
67+
- name: Install libdbus-1-dev
68+
if: ${{ matrix.os == 'ubuntu-latest' }}
69+
run: sudo apt update && sudo apt-get install -yqq libdbus-1-dev
70+
- name: Install latest nightly
71+
uses: actions-rs/toolchain@v1
72+
with:
73+
toolchain: nightly
74+
override: true
75+
- name: Run cargo build
76+
uses: actions-rs/cargo@v1
77+
with:
78+
command: build
79+
args: --release --all-features
80+
- name: Upload artifact
81+
if: ${{ matrix.os != 'windows-2022' }}
82+
uses: actions/upload-artifact@v4
83+
with:
84+
name: '${{ matrix.os }}'
85+
path: '${{ github.workspace }}/target/release/*sign'
86+
- name: Upload artifact (Windows)
87+
if: ${{ matrix.os == 'windows-2022' }}
88+
uses: actions/upload-artifact@v4
89+
with:
90+
name: '${{ matrix.os }}'
91+
path: '${{ github.workspace }}/target/release/*sign.exe'

0 commit comments

Comments
 (0)