Skip to content

Commit

Permalink
Revert workflow changes and try GNU's wget
Browse files Browse the repository at this point in the history
  • Loading branch information
rootmos committed Jul 24, 2024
1 parent 2c1668d commit b60838b
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 86 deletions.
154 changes: 77 additions & 77 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ dst = "/etc/rc.d/echoip"
sshd.port = 21230

[[run.hostfwd.tcp]]
haddr = "localhost"
hport = 8000
gport = 80
```
Expand Down
1 change: 0 additions & 1 deletion example/openbsd.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ dst = "/etc/rc.d/echoip"
sshd.port = 21230

[[run.hostfwd.tcp]]
haddr = "localhost"
hport = 8000
gport = 80

Expand Down
1 change: 0 additions & 1 deletion example/parts/30.run.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
sshd.port = 21230

[[run.hostfwd.tcp]]
haddr = "localhost"
hport = 8000
gport = 80
7 changes: 1 addition & 6 deletions tests/example
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b60838b

Please sign in to comment.