Skip to content

feat(rust): multithreading #48

feat(rust): multithreading

feat(rust): multithreading #48

Workflow file for this run

name: PKGBUILD CI
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
changes:
runs-on: ubuntu-latest
# Required permissions
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
pgkbuild: ${{ steps.filter.outputs.pgkbuild }}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
pkgbuild:
- arch_pkgs/**
build-packages:
strategy:
fail-fast: false
matrix:
package:
[
c,
rust
]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build ${{ matrix.package }} PKGBUILD
id: makepkg
uses: edlanglois/pkgbuild-action@v1
with:
pkgdir: arch_pkgs/${{ matrix.package }}
aurDeps: true
- name: Print Package Files
run: |
echo "Successfully created the following package archive"
echo "Package: ${{ steps.makepkg.outputs.pkgfile0 }}"
echo "Package: ${{ steps.makepkg.outputs.pkgfile1 }}"
- name: Upload Package Archive
uses: actions/upload-artifact@v3
with:
name: pkgfiles
path: |
${{ steps.makepkg.outputs.pkgfile0 }}
${{ steps.makepkg.outputs.pkgfile1 }}
# aur-publish:
# if: github.event_name != 'pull_request'
# needs: [build-packages]
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# package:
# [
# cadical-pic,
# glpk-cut-log,
# libpoly-git,
# python-cvc5,
# symfpu-cvc5,
# cvc5,
# cvc5-bestperformance,
# cvc5-bin
# ]
# steps:
# - uses: actions/checkout@v3
# - name: Publish AUR package ${{ matrix.package }}
# uses: KSXGitHub/github-actions-deploy-aur@v2.7.0
# with:
# pkgname: ${{ matrix.package }}
# pkgbuild: ./${{ matrix.package }}/PKGBUILD
# commit_username: ${{ secrets.AUR_USERNAME }}
# commit_email: ${{ secrets.AUR_EMAIL }}
# ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
# commit_message: Update package
# ssh_keyscan_types: rsa,dsa,ecdsa,ed25519
# allow_empty_commits: false
publish-to-repo:
if: ${{ github.event_name != 'pull_request' && needs.changes.outputs.pgkbuild == 'true' }}
runs-on: ubuntu-latest
needs: [build-packages, changes]
container:
image: archlinux:base-devel
steps:
- name: Install dependencies
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm git
- uses: actions/checkout@v4
with:
repository: 'neferin12/repos'
ref: 'main'
token: ${{ secrets.PAT_TOKEN }}
- name: Download packages
uses: actions/download-artifact@v3
with:
name: pkgfiles
path: /tmp/pkgfiles
- name: Add packages to repo
run: |
cp -f /tmp/pkgfiles/* ./arch/x86_64/
cd arch/x86_64
repo-add -p -R pollinger.db.tar.gz *.pkg.tar.zst
- name: Commit changes
run: |
git config --global --add safe.directory /__w/iSM/iSM
git add arch
git config --global user.name 'GitHub Actions [Bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git commit -am "Updated packages"
git push