Skip to content

Commit

Permalink
ci: Split libosdp_sys and other crate publish workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Mar 9, 2024
1 parent a96b472 commit 89630cf
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 19 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/publish-crate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'libosdp-sys-v*'
- 'libosdp-v*'
- 'osdpctl-v*'
workflow_dispatch:
Expand All @@ -20,25 +19,7 @@ on:
required: true

jobs:
cross_platform_check:
name: Build libosdp_sys on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: cargo build -p libosdp_sys

publish:
needs: [cross_platform_check]
name: Publish Crate
runs-on: ubuntu-latest
steps:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/publish-libosdp-sys.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#
# Copyright (c) 2024 Siddharth Chandrasekaran <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0
#

name: Publish libosdp_sys

on:
workflow_dispatch:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'libosdp-sys-v*'

jobs:
cross_platform_check:
name: Build libosdp_sys on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: cargo build -p libosdp_sys

publish:
needs: [cross_platform_check]
name: Publish libosdp_sys
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: cargo publish --token ${CRATES_TOKEN} -p libosdp_sys
env:
CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
REL_TAG: ${{ github.ref_name }}

0 comments on commit 89630cf

Please sign in to comment.