Skip to content

Commit

Permalink
Merge pull request #940 from openzim/few-workflow-fixes
Browse files Browse the repository at this point in the history
Few workflow fixes
  • Loading branch information
kelson42 authored Dec 20, 2024
2 parents 40bfe64 + 0edd859 commit 4cdc70a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 61 deletions.
36 changes: 11 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,22 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
uses: step-security/harden-runner@v2
with:
egress-policy: audit

- name: Checkout code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
uses: actions/checkout@v4

- name: Setup Python 3.10
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install packages
run: |
brew update
brew install gcovr pkg-config ninja || brew link --overwrite python
brew install gcovr ninja || brew link --overwrite python
- name: Install Python modules
run: pip3 install meson pytest
Expand Down Expand Up @@ -102,15 +102,15 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
uses: step-security/harden-runner@v2
with:
egress-policy: audit

- name: Checkout code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
uses: actions/checkout@v4

- name: Setup python 3.10
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down Expand Up @@ -160,8 +160,6 @@ jobs:
- linux-aarch64-dyn
- android-arm
- android-arm64
- win32-static
- win32-dyn
- wasm
with_xapian:
- true
Expand Down Expand Up @@ -203,18 +201,6 @@ jobs:
arch_name: aarch64-linux-android
run_test: false
coverage: false
- target: win32-static
image_variant: f35
lib_postfix: '64'
arch_name: i686-w64-mingw32
run_test: false
coverage: false
- target: win32-dyn
image_variant: f35
lib_postfix: '64'
arch_name: i686-w64-mingw32
run_test: false
coverage: false
- target: wasm
image_variant: focal
lib_postfix: '/x86_64-linux-gnu'
Expand All @@ -229,7 +215,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
uses: step-security/harden-runner@v2
with:
egress-policy: audit

Expand All @@ -240,7 +226,7 @@ jobs:
target_platform: ${{ matrix.target }}

- name: Retrieve source code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
uses: actions/checkout@v4

- name: Compile source code
shell: bash
Expand Down Expand Up @@ -310,12 +296,12 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
uses: step-security/harden-runner@v2
with:
egress-policy: audit

- name: "Checkout code"
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4
with:
persist-credentials: false

Expand Down
72 changes: 36 additions & 36 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,32 @@ jobs:
fail-fast: false
matrix:
distro:
- debian-unstable
- debian-trixie
- debian-bookworm
- debian-bullseye
# - debian-unstable
# - debian-trixie
# - debian-bookworm
# - debian-bullseye
- ubuntu-noble
- ubuntu-jammy
- ubuntu-focal

# Pin your dependencies with https://github.com/mheap/pin-github-action
steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # pin@v2
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # pin@v2
with:
egress-policy: audit

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # pin@v4

# Determine which PPA we should upload to
- name: PPA
id: ppa
run: |
if [[ $REF == refs/tags* ]]
then
echo "::set-output name=ppa::kiwixteam/release"
echo "ppa=kiwixteam/release" >> $GITHUB_OUTPUT
else
echo "::set-output name=ppa::kiwixteam/dev"
echo "ppa=kiwixteam/dev" >> $GITHUB_OUTPUT
fi
env:
REF: ${{ github.ref }}
Expand All @@ -51,33 +51,33 @@ jobs:
email: [email protected]
distro: ${{ matrix.distro }}

- uses: legoktm/gh-action-build-deb@7a6b22239275ae4e425fefc6f1aeb1118160500d # pin@debian-unstable
if: matrix.distro == 'debian-unstable'
name: Build package for debian-unstable
id: build-debian-unstable
with:
args: --no-sign

- uses: legoktm/gh-action-build-deb@b47978ba8498dc8b8153cc3b5f99a5fc1afa5de1 # pin@debian-trixie
if: matrix.distro == 'debian-trixie'
name: Build package for debian-trixie
id: build-debian-trixie
with:
args: --no-sign

- uses: legoktm/gh-action-build-deb@1f4e86a6bb34aaad388167eaf5eb85d553935336 # pin@debian-bookworm
if: matrix.distro == 'debian-bookworm'
name: Build package for debian-bookworm
id: build-debian-bookworm
with:
args: --no-sign

- uses: legoktm/gh-action-build-deb@084b4263209252ec80a75d2c78a586192c17f18d # pin@debian-bullseye
if: matrix.distro == 'debian-bullseye'
name: Build package for debian-bullseye
id: build-debian-bullseye
with:
args: --no-sign
# - uses: legoktm/gh-action-build-deb@7a6b22239275ae4e425fefc6f1aeb1118160500d # pin@debian-unstable
# if: matrix.distro == 'debian-unstable'
# name: Build package for debian-unstable
# id: build-debian-unstable
# with:
# args: --no-sign

# - uses: legoktm/gh-action-build-deb@b47978ba8498dc8b8153cc3b5f99a5fc1afa5de1 # pin@debian-trixie
# if: matrix.distro == 'debian-trixie'
# name: Build package for debian-trixie
# id: build-debian-trixie
# with:
# args: --no-sign

# - uses: legoktm/gh-action-build-deb@1f4e86a6bb34aaad388167eaf5eb85d553935336 # pin@debian-bookworm
# if: matrix.distro == 'debian-bookworm'
# name: Build package for debian-bookworm
# id: build-debian-bookworm
# with:
# args: --no-sign

# - uses: legoktm/gh-action-build-deb@084b4263209252ec80a75d2c78a586192c17f18d # pin@debian-bullseye
# if: matrix.distro == 'debian-bullseye'
# name: Build package for debian-bullseye
# id: build-debian-bullseye
# with:
# args: --no-sign

- uses: legoktm/gh-action-build-deb@9114a536498b65c40b932209b9833aa942bf108d # pin@ubuntu-noble
if: matrix.distro == 'ubuntu-noble'
Expand All @@ -101,7 +101,7 @@ jobs:
args: --no-sign
ppa: ${{ steps.ppa.outputs.ppa }}

- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # pin@v4
- uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # pin@v4
with:
name: Packages for ${{ matrix.distro }}
path: output
Expand Down

0 comments on commit 4cdc70a

Please sign in to comment.