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

fix(ci/debianrepo): avoid running docker arm64 #551

Merged
merged 14 commits into from
Oct 21, 2021
Merged
21 changes: 12 additions & 9 deletions .github/workflows/debianrepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,36 @@ name: debianrepo
on:
push:
branches:
- "stable"
- "release/**"
- "master"
- "debianrepo"

jobs:
test_386:
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v2
- run: ./E2E/debian.sh docker i386
- run: sudo ./E2E/debian.sh docker i386
- run: sudo cat DEBIAN_INSTALLED_PACKAGE.txt

test_amd64:
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v2
- run: ./E2E/debian.sh docker amd64
- run: sudo ./E2E/debian.sh docker amd64
- run: sudo cat DEBIAN_INSTALLED_PACKAGE.txt

test_arm:
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v2
- run: sudo apt-get update -q
- run: sudo apt-get install -y qemu-user-static
- run: ./E2E/debian.sh docker armhf
- run: sudo ./E2E/debian.sh docker armhf
- run: sudo cat DEBIAN_INSTALLED_PACKAGE.txt

build_arm64:
test_arm64:
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v2
- run: sudo apt-get update -q
- run: sudo apt-get install -y qemu-user-static
- run: ./E2E/debian.sh docker arm64
- run: sudo ./E2E/debian.sh docker arm64
- run: sudo cat DEBIAN_INSTALLED_PACKAGE.txt
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/*.asc
/coverage.cov
/*.deb
/DEBIAN_INSTALLED_PACKAGE.txt
/debops-ci
.DS_Store
/*.jsonl
Expand Down
12 changes: 7 additions & 5 deletions E2E/debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ set -e
install_flow() {
set -x
export DEBIAN_FRONTEND=noninteractive
dpkg --add-architecture "$1"
apt-get update
apt-get install --yes gnupg
apt-key adv --verbose --keyserver hkp://keyserver.ubuntu.com --recv-keys 'B5A08F01796E7F521861B449372D1FF271F2DD50'
echo "deb http://deb.ooni.org/ unstable main" | tee /etc/apt/sources.list.d/ooniprobe.list
echo "deb [arch=$1] http://deb.ooni.org/ unstable main" | tee /etc/apt/sources.list.d/ooniprobe.list
apt-get update
apt-get install --yes ooniprobe-cli
dpkg -l | grep ooniprobe-cli > DEBIAN_INSTALLED_PACKAGE.txt
}

docker_flow() {
Expand All @@ -23,8 +25,8 @@ docker_flow() {
exit 1
}
set -x
docker pull --platform "linux/$1" debian:stable
docker run --platform "linux/$1" -v "$(pwd):/ooni" -w /ooni debian:stable ./E2E/debian.sh install
docker pull debian:stable
docker run -v "$(pwd):/ooni" -w /ooni debian:stable ./E2E/debian.sh install "$1"
}

if [ "$1" = "docker" ]; then
Expand All @@ -35,10 +37,10 @@ if [ "$1" = "docker" ]; then
docker_flow "$2"

elif [ "$1" = "install" ]; then
install_flow
install_flow "$2"

else
echo "usage: $0 docker {i386,amd64,armhf,arm64}" 1>&2
echo " $0 install" 1>&2
echo " $0 install {i386,amd64,armhf,arm64}" 1>&2
exit 1
fi