From b60838b5927b6959bcfbbcc0eae99de691a5b1e7 Mon Sep 17 00:00:00 2001 From: Gustav Behm Date: Wed, 24 Jul 2024 22:17:19 +0200 Subject: [PATCH] Revert workflow changes and try GNU's wget --- .github/workflows/tests.yaml | 154 +++++++++++++++++------------------ example/README.md | 1 - example/openbsd.toml | 1 - example/parts/30.run.toml | 1 - tests/example | 7 +- 5 files changed, 78 insertions(+), 86 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5796888..8faccc0 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -9,84 +9,84 @@ on: workflow_dispatch: jobs: -# deps: -# strategy: -# matrix: -# distro: [ "alpine:latest", "ubuntu:latest", "debian:latest", "archlinux:latest" ] -# arch: [ amd64, i386 ] -# runs-on: ubuntu-latest -# container: -# image: ${{ matrix.distro }} -# steps: -# - name: Install essentials -# run: | -# if [ "${{ matrix.distro }}" = "alpine:latest" ]; then -# apk add python3 -# elif [ "${{ matrix.distro }}" = "archlinux:latest" ]; then -# pacman -Sy -# pacman -S --noconfirm python -# else -# apt-get update -# apt-get install --yes --no-install-recommends python3 -# fi -# -# - name: Check out repository code -# uses: actions/checkout@v4 -# -# - name: Install dependencies -# run: ./openbsd deps --install --arch=${{ matrix.arch }} -# -# base: -# needs: -# - deps -# strategy: -# matrix: -# version: [ 7.3, 7.4, 7.5 ] -# arch: [ amd64, i386 ] -# runs-on: ubuntu-latest -# container: -# image: alpine:latest -# env: -# OPENBSD_CACHE: /tmp/cache -# WORKDIR: /${{github.job}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}} -# steps: -# - name: Install essentials -# run: apk add bash python3 tar -# -# - name: Check out repository code -# uses: actions/checkout@v4 -# -# - name: Install dependencies -# run: ./openbsd deps --install --arch=${{ matrix.arch }} -# -# - name: Cache OpenBSD files -# id: cache-openbsd -# uses: actions/cache@v4 -# with: -# path: ${{ env.OPENBSD_CACHE }} -# key: openbsd-${{ matrix.version }}-${{ matrix.arch }}-${{ github.job }} -# restore-keys: | -# openbsd-${{ matrix.version }}-${{ matrix.arch }}-${{ github.job }} -# openbsd-${{ matrix.version }}-${{ matrix.arch }} -# openbsd-${{ matrix.version }} -# openbsd -# -# - name: Run test -# run: tests/base -v ${{ matrix.version }} -a ${{ matrix.arch }} -# -# - name: Keep artifacts -# uses: actions/upload-artifact@v4 -# if: always() -# with: -# name: ${{ github.job }}-${{ matrix.version }}-${{ matrix.arch }}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}} -# retention-days: 3 -# path: | -# /${{github.job}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}/**/* -# !/**/*.img + deps: + strategy: + matrix: + distro: [ "alpine:latest", "ubuntu:latest", "debian:latest", "archlinux:latest" ] + arch: [ amd64, i386 ] + runs-on: ubuntu-latest + container: + image: ${{ matrix.distro }} + steps: + - name: Install essentials + run: | + if [ "${{ matrix.distro }}" = "alpine:latest" ]; then + apk add python3 + elif [ "${{ matrix.distro }}" = "archlinux:latest" ]; then + pacman -Sy + pacman -S --noconfirm python + else + apt-get update + apt-get install --yes --no-install-recommends python3 + fi + + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Install dependencies + run: ./openbsd deps --install --arch=${{ matrix.arch }} + + base: + needs: + - deps + strategy: + matrix: + version: [ 7.3, 7.4, 7.5 ] + arch: [ amd64, i386 ] + runs-on: ubuntu-latest + container: + image: alpine:latest + env: + OPENBSD_CACHE: /tmp/cache + WORKDIR: /${{github.job}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}} + steps: + - name: Install essentials + run: apk add bash python3 tar + + - name: Check out repository code + uses: actions/checkout@v4 + + - name: Install dependencies + run: ./openbsd deps --install --arch=${{ matrix.arch }} + + - name: Cache OpenBSD files + id: cache-openbsd + uses: actions/cache@v4 + with: + path: ${{ env.OPENBSD_CACHE }} + key: openbsd-${{ matrix.version }}-${{ matrix.arch }}-${{ github.job }} + restore-keys: | + openbsd-${{ matrix.version }}-${{ matrix.arch }}-${{ github.job }} + openbsd-${{ matrix.version }}-${{ matrix.arch }} + openbsd-${{ matrix.version }} + openbsd + + - name: Run test + run: tests/base -v ${{ matrix.version }} -a ${{ matrix.arch }} + + - name: Keep artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: ${{ github.job }}-${{ matrix.version }}-${{ matrix.arch }}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}} + retention-days: 3 + path: | + /${{github.job}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}/**/* + !/**/*.img example: -# needs: -# - base + needs: + - base strategy: matrix: version: [ 7.5 ] @@ -100,7 +100,7 @@ jobs: steps: - name: Install essentials - run: apk add bash python3 tar net-tools + run: apk add bash python3 tar wget - name: Check out repository code uses: actions/checkout@v4 diff --git a/example/README.md b/example/README.md index 14b7651..0e1a893 100644 --- a/example/README.md +++ b/example/README.md @@ -68,7 +68,6 @@ dst = "/etc/rc.d/echoip" sshd.port = 21230 [[run.hostfwd.tcp]] -haddr = "localhost" hport = 8000 gport = 80 ``` diff --git a/example/openbsd.toml b/example/openbsd.toml index 33ad547..a31febe 100644 --- a/example/openbsd.toml +++ b/example/openbsd.toml @@ -51,7 +51,6 @@ dst = "/etc/rc.d/echoip" sshd.port = 21230 [[run.hostfwd.tcp]] -haddr = "localhost" hport = 8000 gport = 80 diff --git a/example/parts/30.run.toml b/example/parts/30.run.toml index b110cbf..f6a4109 100644 --- a/example/parts/30.run.toml +++ b/example/parts/30.run.toml @@ -2,6 +2,5 @@ sshd.port = 21230 [[run.hostfwd.tcp]] -haddr = "localhost" hport = 8000 gport = 80 diff --git a/tests/example b/tests/example index 8c9386e..9dba114 100755 --- a/tests/example +++ b/tests/example @@ -28,12 +28,7 @@ while ! [ -f "ssh" ]; do echo 1>&2 "waiting for boot..." done -echo 1>&2 "netstat guest:" -./ssh -- netstat -l -echo 1>&2 "netstat host:" -netstat -l - -HTTP=http://127.0.0.1:8000 +HTTP=http://localhost:8000 echo 1>&2 "testing $HTTP" INDEX="index.html"