Revert "ci: Disable Debian Trixie builds" #3500
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
name: Tests | |
on: | |
push: | |
pull_request: | |
branches: [ main ] | |
schedule: | |
- cron: '0 0 * * *' # Run every day at 00:00 UTC. | |
workflow_dispatch: | |
jobs: | |
windows: | |
runs-on: windows-latest | |
env: | |
DUMMY_CONVERSION: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- run: pip install poetry | |
- run: poetry install | |
- name: Run CLI tests | |
run: poetry run make test | |
# Taken from: https://github.com/orgs/community/discussions/27149#discussioncomment-3254829 | |
- name: Set path for candle and light | |
run: echo "C:\Program Files (x86)\WiX Toolset v3.14\bin" >> $GITHUB_PATH | |
shell: bash | |
- name: Build the MSI installer | |
# NOTE: This also builds the .exe internally. | |
run: poetry run .\install\windows\build-app.bat | |
macOS: | |
runs-on: macos-latest | |
env: | |
DUMMY_CONVERSION: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- run: pip install poetry | |
- run: poetry install | |
- name: Run CLI tests | |
run: poetry run make test | |
build-deb: | |
runs-on: ubuntu-latest | |
env: | |
target: debian-bookworm | |
distro: debian | |
version: bookworm | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Build dev environment | |
run: | | |
./dev_scripts/env.py --distro ${{ env.distro }} \ | |
--version ${{ env.version }} \ | |
build-dev | |
- name: Install container build dependencies | |
run: sudo apt install pipx && pipx install poetry | |
- name: Build Dangerzone image | |
run: python3 ./install/common/build-image.py | |
- name: Build Dangerzone .deb | |
run: | | |
./dev_scripts/env.py --distro ${{ env.distro }} \ | |
--version ${{ env.version }} \ | |
run --dev --no-gui ./dangerzone/install/linux/build-deb.py | |
- name: Upload Dangerzone .deb | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dangerzone.deb | |
path: "deb_dist/dangerzone_*_all.deb" | |
install-deb: | |
runs-on: ubuntu-latest | |
needs: build-deb | |
strategy: | |
matrix: | |
include: | |
- target: ubuntu-20.04 | |
distro: ubuntu | |
version: "20.04" | |
- target: ubuntu-22.04 | |
distro: ubuntu | |
version: "22.04" | |
- target: ubuntu-23.10 | |
distro: ubuntu | |
version: "23.10" | |
- target: ubuntu-24.04 | |
distro: ubuntu | |
version: "24.04" | |
- target: debian-bullseye | |
distro: debian | |
version: bullseye | |
- target: debian-bookworm | |
distro: debian | |
version: bookworm | |
- target: debian-trixie | |
distro: debian | |
version: trixie | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Download Dangerzone .deb | |
uses: actions/download-artifact@v4 | |
with: | |
name: dangerzone.deb | |
path: "deb_dist/" | |
- name: Create end-user environment on (${{ matrix.target }}) | |
run: | | |
./dev_scripts/env.py --distro ${{ matrix.distro }} \ | |
--version ${{ matrix.version }} \ | |
build | |
- name: Configure Podman for Debian Bullseye specifically | |
if: matrix.target == 'debian-bullseye' | |
run: | | |
# Create a Podman config specifically for Bullseye (see #388). | |
mkdir bullseye_fix | |
cd bullseye_fix | |
cat > containers.conf <<EOF | |
[engine] | |
cgroup_manager="cgroupfs" | |
events_logger="file" | |
EOF | |
# Copy the Podman config into the container image we created for the | |
# Dangerzone environment. | |
cat > Dockerfile.bullseye <<EOF | |
FROM dangerzone.rocks/debian:bullseye-backports | |
RUN mkdir -p /home/user/.config/containers | |
COPY containers.conf /home/user/.config/containers/ | |
EOF | |
# Create a new image from the Dangerzone environment and re-tag it. | |
podman build -t dangerzone.rocks/debian:bullseye-backports \ | |
-f Dockerfile.bullseye . | |
- name: Run a test command | |
run: | | |
./dev_scripts/env.py --distro ${{ matrix.distro }} \ | |
--version ${{ matrix.version }} \ | |
run dangerzone-cli dangerzone/tests/test_docs/sample-pdf.pdf | |
- name: Check that the Dangerzone GUI imports work | |
run: | | |
./dev_scripts/env.py --distro ${{ matrix.distro }} \ | |
--version ${{ matrix.version }} \ | |
run dangerzone --help | |
build-install-rpm: | |
name: "Build and install a Dangerzone RPM on Fedora ${{matrix.version}}" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- version: "39" | |
- version: "40" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build dev environment | |
run: | | |
./dev_scripts/env.py --distro fedora --version ${{ matrix.version }} \ | |
build-dev | |
- name: Build Dangerzone image | |
run: | | |
./dev_scripts/env.py --distro fedora --version ${{ matrix.version }} \ | |
run --dev --no-gui \ | |
bash -c 'cd /home/user/dangerzone && python3 ./install/common/build-image.py' | |
- name: Build Dangerzone .rpm | |
run: | | |
./dev_scripts/env.py --distro fedora --version ${{ matrix.version }} \ | |
run --dev --no-gui ./dangerzone/install/linux/build-rpm.py | |
# Reclaim some space in this step, now that the dev environment is no | |
# longer necessary. Previously, we encountered out-of-space issues while | |
# running this CI job. | |
- name: Reclaim some storage space | |
run: podman system reset -f | |
- name: Build end-user environment | |
run: | | |
./dev_scripts/env.py --distro fedora --version ${{ matrix.version }} \ | |
build --download-pyside6 | |
- name: Run a test command | |
run: | | |
./dev_scripts/env.py --distro fedora --version ${{ matrix.version }} \ | |
run dangerzone-cli dangerzone/tests/test_docs/sample-pdf.pdf | |
- name: Check that the Dangerzone GUI imports work | |
run: | | |
./dev_scripts/env.py --distro fedora --version ${{ matrix.version }} \ | |
run dangerzone --help |