Update GitHub actions for CD pipeline
This commit is contained in:
28
.github/workflows/cd.yml
vendored
28
.github/workflows/cd.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
|||||||
dependencies: 'libpulse-dev libdbus-1-dev libncursesw5-dev libxcb-shape0-dev libxcb-xfixes0-dev'
|
dependencies: 'libpulse-dev libdbus-1-dev libncursesw5-dev libxcb-shape0-dev libxcb-xfixes0-dev'
|
||||||
- build_target: linux-arm64
|
- build_target: linux-arm64
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
container: rustembedded/cross:aarch64-unknown-linux-gnu-0.2.1
|
container: ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main
|
||||||
target: aarch64-unknown-linux-gnu
|
target: aarch64-unknown-linux-gnu
|
||||||
features: '--no-default-features --features alsa_backend,cursive/termion-backend'
|
features: '--no-default-features --features alsa_backend,cursive/termion-backend'
|
||||||
dependencies: 'libasound2-dev:arm64 libssl-dev:arm64'
|
dependencies: 'libasound2-dev:arm64 libssl-dev:arm64'
|
||||||
@@ -33,7 +33,7 @@ jobs:
|
|||||||
pkg_config_path: '/usr/lib/aarch64-linux-gnu/pkgconfig/'
|
pkg_config_path: '/usr/lib/aarch64-linux-gnu/pkgconfig/'
|
||||||
- build_target: linux-armhf
|
- build_target: linux-armhf
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
container: rustembedded/cross:armv7-unknown-linux-gnueabihf-0.2.1
|
container: ghcr.io/cross-rs/armv7-unknown-linux-gnueabihf:main
|
||||||
target: armv7-unknown-linux-gnueabihf
|
target: armv7-unknown-linux-gnueabihf
|
||||||
features: '--no-default-features --features alsa_backend,cursive/termion-backend'
|
features: '--no-default-features --features alsa_backend,cursive/termion-backend'
|
||||||
dependencies: 'libasound2-dev:armhf libssl-dev:armhf'
|
dependencies: 'libasound2-dev:armhf libssl-dev:armhf'
|
||||||
@@ -49,12 +49,10 @@ jobs:
|
|||||||
features: '--no-default-features --features rodio_backend,pancurses_backend,share_clipboard,notify'
|
features: '--no-default-features --features rodio_backend,pancurses_backend,share_clipboard,notify'
|
||||||
steps:
|
steps:
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
profile: minimal
|
toolchain: stable
|
||||||
- name: Install macOS dependencies
|
- name: Install macOS dependencies
|
||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-latest'
|
||||||
run: brew install portaudio pkg-config
|
run: brew install portaudio pkg-config
|
||||||
@@ -69,19 +67,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
apt update
|
apt update
|
||||||
apt install -y ${{ matrix.dependencies }}
|
apt install -y ${{ matrix.dependencies }}
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
name: Checkout src
|
name: Checkout src
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/registry
|
~/.cargo/registry/index/
|
||||||
~/.cargo/git
|
~/.cargo/registry/
|
||||||
|
~/.cargo/git/db/
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
- name: Running cargo build
|
- name: Running cargo build
|
||||||
uses: actions-rs/cargo@v1
|
run: cargo build --release --target ${{ matrix.target }} ${{ matrix.features }}
|
||||||
with:
|
|
||||||
command: build
|
|
||||||
args: --locked --release --target ${{ matrix.target }} ${{ matrix.features }}
|
|
||||||
- name: Extract git tag
|
- name: Extract git tag
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})"
|
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})"
|
||||||
@@ -91,11 +87,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd target/${{ matrix.target }}/release
|
cd target/${{ matrix.target }}/release
|
||||||
case ${{ matrix.target }} in
|
case ${{ matrix.target }} in
|
||||||
*-pc-windows-*)
|
*-pc-windows-*)
|
||||||
7z -y a ncspot-${{ steps.extract_tag.outputs.tag }}-${{ matrix.build_target }}.zip ncspot.exe
|
7z -y a ncspot-${{ steps.extract_tag.outputs.tag }}-${{ matrix.build_target }}.zip ncspot.exe
|
||||||
sha256sum ncspot-${{ steps.extract_tag.outputs.tag }}-${{ matrix.build_target }}.zip > ncspot-${{ steps.extract_tag.outputs.tag }}-${{ matrix.build_target }}.sha256
|
sha256sum ncspot-${{ steps.extract_tag.outputs.tag }}-${{ matrix.build_target }}.zip > ncspot-${{ steps.extract_tag.outputs.tag }}-${{ matrix.build_target }}.sha256
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
tar czvf ncspot-${{ steps.extract_tag.outputs.tag }}-${{ matrix.build_target }}.tar.gz ncspot
|
tar czvf ncspot-${{ steps.extract_tag.outputs.tag }}-${{ matrix.build_target }}.tar.gz ncspot
|
||||||
shasum -a 256 ncspot-${{ steps.extract_tag.outputs.tag }}-${{ matrix.build_target }}.tar.gz > ncspot-${{ steps.extract_tag.outputs.tag }}-${{ matrix.build_target }}.sha256
|
shasum -a 256 ncspot-${{ steps.extract_tag.outputs.tag }}-${{ matrix.build_target }}.tar.gz > ncspot-${{ steps.extract_tag.outputs.tag }}-${{ matrix.build_target }}.sha256
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user