Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install .deb files and try to do conversions on them #20

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 104 additions & 1 deletion .github/workflows/check-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,113 @@ jobs:
runs-on: ubuntu-latest
container: debian:bullseye
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Debian packaging dependencies
run: apt-get update && apt-get install -y gpg
- name: Verify signatures on all Release files
run: |
gpg --import repo/public/fpf-apt-tools-archive-keyring.gpg
for i in repo/public/dists/*/Release; do gpg --verify "${i}.gpg" "$i"; done

install-deb:
name: "Install on ${{ matrix.distro }} ${{matrix.version}}"
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: ubuntu-20.04
distro: ubuntu
version: "20.04"
version-name: focal
- target: ubuntu-22.04
distro: ubuntu
version: "22.04"
version-name: jammy
- target: ubuntu-23.10
distro: ubuntu
version: "23.10"
version-name: mantic
- target: ubuntu-24.04
distro: ubuntu
version: "24.04"
version-name: noble
- target: debian-bullseye
distro: debian
version: bullseye
version-name: bullseye
- target: debian-bookworm
distro: debian
version: bookworm
version-name: bookworm
- target: debian-trixie
distro: debian
version: trixie
version-name: trixie

steps:
- name: Checkout dangerzone repo
uses: actions/checkout@v4
with:
repository: freedomofpress/dangerzone
path: main

- name: Checkout apt-tools-prod repo
uses: actions/checkout@v4
with:
path: deb
lfs: 'true'

- name: cp dangerzone .deb
run: |
mkdir "./main/deb_dist"
cp ./deb/dangerzone/${{ matrix.version-name }}/dangerzone_*_all.deb ./main/deb_dist/.

- uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Create end-user environment on (${{ matrix.target }})
working-directory: main
run: |
./dev_scripts/env.py --distro ${{ matrix.distro }} \
--version ${{ matrix.version }} \
build

- name: Configure Podman for Debian Bullseye specifically
working-directory: main
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
working-directory: main
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
working-directory: main
run: |
./dev_scripts/env.py --distro ${{ matrix.distro }} \
--version ${{ matrix.version }} \
run dangerzone --help