-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(obs): split test and build obs
- Loading branch information
Showing
2 changed files
with
80 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: publish packages using Open Build Service | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build-obs-binary: | ||
strategy: | ||
matrix: | ||
include: | ||
- repo: Fedora_39 | ||
spec: librashader.spec | ||
- repo: xUbuntu_23.10 | ||
spec: librashader.spec | ||
- repo: Arch | ||
spec: PKGBUILD | ||
runs-on: ubuntu-latest | ||
container: | ||
image: fedora:39 | ||
options: --privileged | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install OSC and dependencies | ||
env: | ||
OBS_CONFIG: ${{ secrets.OBS_CONFIG }} | ||
run: | | ||
sudo dnf install -y osc obs-service-obs_scm obs-service-cargo_vendor cargo python3-zstandard | ||
mkdir -p ~/.config/osc | ||
echo "$OBS_CONFIG" > ~/.config/osc/oscrc | ||
- name: Checkout Open Build Service repository | ||
run: | | ||
osc co home:chyyran:librashader/librashader | ||
- name: Copy spec from repository | ||
run: | | ||
cp -r ./pkg/obs/ home:chyyran:librashader/librashader/ | ||
sed -r -i 's/(<param name="revision">)(.+)(<\/param>)/<param name="revision">${{ github.sha }}<\/param>/g' home:chyyran:librashader/librashader/_service | ||
- name: Vendor sources for Open Build Service | ||
run: | | ||
cd home:chyyran:librashader/librashader/ | ||
osc service mr | ||
- name: Build package | ||
run: | | ||
cd home:chyyran:librashader/librashader/ | ||
osc build --no-verify --trust-all-projects ${{ matrix.repo }} x86_64 ${{ matrix.spec }} | ||
publish-obs: | ||
needs: build-obs-binary | ||
runs-on: ubuntu-latest | ||
container: fedora:39 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install OSC and dependencies | ||
env: | ||
OBS_CONFIG: ${{ secrets.OBS_CONFIG }} | ||
run: | | ||
sudo dnf install -y osc obs-service-obs_scm obs-service-cargo_vendor cargo python3-zstandard | ||
mkdir -p ~/.config/osc | ||
echo "$OBS_CONFIG" > ~/.config/osc/oscrc | ||
- name: Checkout Open Build Service repository | ||
run: | | ||
osc co home:chyyran:librashader/librashader | ||
- name: Copy spec from repository | ||
run: | | ||
cp -r ./pkg/obs/ home:chyyran:librashader/librashader/ | ||
sed -r -i 's/(<param name="revision">)(.+)(<\/param>)/<param name="revision">${{ github.sha }}<\/param>/g' home:chyyran:librashader/librashader/_service | ||
- name: Vendor sources for Open Build Service | ||
run: | | ||
cd home:chyyran:librashader/librashader/ | ||
osc service mr | ||
- name: Commit source artifacts to Open Build Service | ||
run: | | ||
cd home:chyyran:librashader/librashader/ | ||
osc ar | ||
osc commit -f -m "git-rev ${{ github.sha }}" |