diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 96cec0d..ad8e583 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -5,88 +5,88 @@ on: workflow_run: workflows: [ Sanity checks ] types: [ completed ] - branches: [ main ] + branches: [ main, fix-example-test ] 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 ] diff --git a/example/README.md b/example/README.md index 0e1a893..14b7651 100644 --- a/example/README.md +++ b/example/README.md @@ -68,6 +68,7 @@ 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 a31febe..33ad547 100644 --- a/example/openbsd.toml +++ b/example/openbsd.toml @@ -51,6 +51,7 @@ 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 f6a4109..b110cbf 100644 --- a/example/parts/30.run.toml +++ b/example/parts/30.run.toml @@ -2,5 +2,6 @@ sshd.port = 21230 [[run.hostfwd.tcp]] +haddr = "localhost" hport = 8000 gport = 80