Skip to content

Commit

Permalink
Update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kepstin committed Dec 11, 2024
1 parent 8b9940d commit 60ab0ac
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 88 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install build-essential libgirepository1.0-dev gir1.2-glib-2.0 gir1.2-poppler-0.18 gir1.2-gtk-3.0 gir1.2-gdkpixbuf-2.0 gir1.2-pango-1.0
DEBIAN_FRONTEND=noninteractive sudo apt-get install build-essential libgirepository1.0-dev gir1.2-glib-2.0 gir1.2-poppler-0.18 gir1.2-gtk-3.0 gir1.2-gdkpixbuf-2.0 gir1.2-pango-1.0 libcairo2-dev
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.8"
cache: pip
Expand All @@ -56,12 +56,12 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
setup-python-dependencies: false

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
81 changes: 7 additions & 74 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends debhelper devscripts equivs git git-buildpackage pristine-tar
- name: Checkout source code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
fetch-depth: 0
Expand Down Expand Up @@ -68,105 +68,38 @@ jobs:
ls ..
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ubuntu-${{ matrix.UBUNTU_VERSION }}
path: "*.deb"

amazonlinux-2:
runs-on: ubuntu-latest
container: amazonlinux:2
defaults:
run:
shell: bash
steps:
- name: Install Python and package build dependencies
run: |
amazon-linux-extras enable python3.8 ruby3.0
yum clean metadata
yum install -y \
python38 python38-devel python38-wheel \
git gcc make \
cairo-gobject-devel gobject-introspection-devel \
ruby ruby-devel ruby-irb rubygem-rake rubygem-json rubygems \
rpm-build
pip3.8 install virtualenv-tools3
gem install --no-document fpm
- name: Checkout source code
uses: actions/checkout@v3
with:
fetch-depth: 0
path: bbb-presentation-video

- name: Build and install package to image directory
run: |
python3.8 -m venv bbb-presentation-video-image/opt/bbb-presentation-video
bbb-presentation-video-image/opt/bbb-presentation-video/bin/python -m pip install ./bbb-presentation-video -c ./bbb-presentation-video/constraints-amazonlinux-2.txt
virtualenv-tools --update-path /opt/bbb-presentation-video bbb-presentation-video-image/opt/bbb-presentation-video
mkdir -pv bbb-presentation-video-image/usr/bin
ln -sv /opt/bbb-presentation-video/bin/bbb-presentation-video bbb-presentation-video-image/usr/bin
- name: Use fpm to build rpm package
run: |
pushd bbb-presentation-video
eval "$(./dch_version.sh)"
popd
fpm --verbose \
--name bbb-presentation-video \
--input-type dir \
--chdir bbb-presentation-video-image \
--output-type rpm \
--version "${DCH_VERSION}" \
--rpm-dist amzn2 \
--rpm-autoreqprov \
--depends python3.8 \
--depends gobject-introspection \
--depends poppler-glib \
--depends gdk-pixbuf2 \
--depends gtk3 \
--depends pango \
--depends liberation-fonts \
--depends ffmpeg \
.
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: amazonlinux-2
path: "*.rpm"

assets:
name: "Upload assets to release"
needs: [ ubuntu, amazonlinux-2 ]
needs: [ ubuntu ]
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' }}
permissions:
contents: write
actions: read

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: ubuntu-20.04
path: ubuntu-20.04

- uses: actions/download-artifact@v3
with:
name: amazonlinux-2
path: amazonlinux-2

- name: Create release asset archives
run: |
for asset in ubuntu-20.04 amazonlinux-2 ; do
for asset in ubuntu-20.04 ; do
zip --junk-paths --recurse-paths --compression-method store "${asset}.zip" "${asset}"
done
- name: Upload release assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
for asset in ubuntu-20.04 amazonlinux-2 ; do
for asset in ubuntu-20.04 ; do
gh release upload ${{ github.ref_name }} "${asset}.zip"
done
9 changes: 4 additions & 5 deletions .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,15 @@ jobs:

steps:
- name: Download test results
uses: dawidd6/action-download-artifact@v2
uses: actions/download-artifact@v4
with:
name: junit
path: junit/
workflow: ${{ github.event.workflow.id }}
workflow_conclusion: ""
run_id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}

- name: Publish test report
uses: mikepenz/action-junit-report@v3
uses: mikepenz/action-junit-report@v5
with:
commit: ${{ github.event.workflow_run.head_sha }}
report_paths: junit/**.xml
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
steps:

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
DEBIAN_FRONTEND=noninteractive sudo apt-get install build-essential libgirepository1.0-dev gir1.2-glib-2.0 gir1.2-poppler-0.18 gir1.2-gtk-3.0 gir1.2-gdkpixbuf-2.0 gir1.2-pango-1.0
DEBIAN_FRONTEND=noninteractive sudo apt-get install build-essential libgirepository1.0-dev gir1.2-glib-2.0 gir1.2-poppler-0.18 gir1.2-gtk-3.0 gir1.2-gdkpixbuf-2.0 gir1.2-pango-1.0 libcairo2-dev
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:

- name: Upload test results
if: ${{ success() || failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: junit
path: junit/

0 comments on commit 60ab0ac

Please sign in to comment.