|
7 | 7 | jobs:
|
8 | 8 | get-version:
|
9 | 9 | runs-on: ubuntu-latest
|
| 10 | + outputs: |
| 11 | + version: v${{ steps.get_version.outputs.value }}+rev.g${{ steps.trim_sha.outputs.trimmed_sha }} |
10 | 12 | steps:
|
| 13 | + - name: Get package version |
| 14 | + |
| 15 | + id: get_version |
| 16 | + with: |
| 17 | + file: Cargo.toml |
| 18 | + field: package.version |
| 19 | + |
11 | 20 | - name: Trim commit SHA
|
12 | 21 | id: trim_sha
|
13 | 22 | run: |
|
14 | 23 | commit_sha=${{ github.sha }}
|
15 |
| - echo "trimmed_sha=r${commit_sha:0:7}" | tee $GITHUB_ENV |
| 24 | + echo "trimmed_sha=${commit_sha:0:7}" | tee $GITHUB_ENV |
16 | 25 | build:
|
17 | 26 | strategy:
|
18 | 27 | matrix:
|
19 | 28 | include:
|
20 | 29 | - job-name: Windows x86_64
|
21 | 30 | target: x86_64-pc-windows-msvc
|
22 | 31 | runs-on: windows-latest
|
23 |
| - artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-windows-x86_64 |
| 32 | + artifact-name: pesde-debug-${{ needs.get-version.outputs.version }}-windows-x86_64 |
24 | 33 |
|
25 | 34 | - job-name: Linux x86_64
|
26 | 35 | target: x86_64-unknown-linux-gnu
|
27 | 36 | runs-on: ubuntu-latest
|
28 |
| - artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-linux-x86_64 |
| 37 | + artifact-name: pesde-debug-${{ needs.get-version.outputs.version }}-linux-x86_64 |
29 | 38 |
|
30 | 39 | - job-name: macOS x86_64
|
31 | 40 | target: x86_64-apple-darwin
|
32 | 41 | runs-on: macos-13
|
33 |
| - artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-macos-x86_64 |
| 42 | + artifact-name: pesde-debug-${{ needs.get-version.outputs.version }}-macos-x86_64 |
34 | 43 |
|
35 | 44 | - job-name: macOS aarch64
|
36 | 45 | target: aarch64-apple-darwin
|
37 | 46 | runs-on: macos-latest
|
38 |
| - artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-macos-aarch64 |
| 47 | + artifact-name: pesde-debug-${{ needs.get-version.outputs.version }}-macos-aarch64 |
39 | 48 |
|
40 | 49 | name: Build for ${{ matrix.job-name }}
|
41 | 50 | runs-on: ${{ matrix.runs-on }}
|
42 | 51 | needs: get-version
|
43 | 52 | steps:
|
44 | 53 | - name: Checkout
|
45 | 54 | uses: actions/checkout@v4
|
| 55 | + |
46 | 56 | - name: Install Linux build dependencies
|
47 | 57 | if: ${{ matrix.runs-on == 'ubuntu-latest' }}
|
48 | 58 | run: |
|
49 | 59 | sudo apt-get update
|
50 | 60 | sudo apt-get install libdbus-1-dev pkg-config
|
| 61 | +
|
51 | 62 | - name: Install Rust toolchain
|
52 | 63 | uses: dtolnay/rust-toolchain@stable
|
| 64 | + |
53 | 65 | - name: Compile in debug mode
|
54 | 66 | run: cargo build --bins --no-default-features --features bin,patches,wally-compat --target ${{ matrix.target }} --locked
|
| 67 | + |
55 | 68 | - name: Upload artifact
|
56 | 69 | uses: actions/upload-artifact@v4
|
57 | 70 | with:
|
|
0 commit comments