2024-02-04 08:15:00 +11:00
|
|
|
name: build Linux packages with Open Build Service
|
|
|
|
|
|
|
|
on:
|
2024-02-15 13:37:00 +11:00
|
|
|
pull_request_target:
|
2024-02-04 08:15:00 +11:00
|
|
|
branches: [ "master" ]
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
2024-02-20 04:01:50 +11:00
|
|
|
approve-obs-build:
|
|
|
|
name: "approval"
|
2024-02-15 13:37:00 +11:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Approve
|
|
|
|
run: echo OBS build CI test runs need to be approved by a maintainer.
|
2024-02-04 08:15:00 +11:00
|
|
|
build-obs-binary:
|
2024-02-15 13:37:00 +11:00
|
|
|
environment:
|
|
|
|
name: obs-build-env
|
2024-02-04 08:15:00 +11:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- repo: Fedora_39
|
|
|
|
spec: librashader.spec
|
2024-02-12 03:36:41 +11:00
|
|
|
can_fail: true
|
2024-02-20 04:01:50 +11:00
|
|
|
name: Fedora 39 (.rpm)
|
2024-02-04 08:15:00 +11:00
|
|
|
- repo: xUbuntu_23.10
|
|
|
|
spec: librashader.spec
|
2024-02-12 03:36:41 +11:00
|
|
|
can_fail: true
|
2024-02-20 04:01:50 +11:00
|
|
|
name: Ubuntu 23.10 (.deb)
|
2024-02-04 08:15:00 +11:00
|
|
|
- repo: Arch
|
|
|
|
spec: PKGBUILD
|
2024-02-12 03:36:41 +11:00
|
|
|
can_fail: false
|
2024-02-20 04:01:50 +11:00
|
|
|
name: Arch (PKGBUILD)
|
2024-02-04 08:15:00 +11:00
|
|
|
runs-on: ubuntu-latest
|
2024-02-15 13:37:00 +11:00
|
|
|
needs: [approve-obs-build]
|
2024-02-12 03:36:41 +11:00
|
|
|
continue-on-error: ${{ matrix.can_fail }}
|
2024-02-20 04:01:50 +11:00
|
|
|
name: ${{ matrix.name }}
|
2024-02-04 08:15:00 +11:00
|
|
|
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 }}
|