From 113002038ee1106193ccf994c7a604fe4de091a9 Mon Sep 17 00:00:00 2001 From: leleliu008 Date: Tue, 30 Jul 2024 21:02:10 +0800 Subject: [PATCH] optimized --- .github/workflows/freebsd.yml | 29 ++++++++++++++--------------- .github/workflows/netbsd.yml | 25 ++++++++++++------------- .github/workflows/openbsd.yml | 29 ++++++++++++++++------------- 3 files changed, 42 insertions(+), 41 deletions(-) diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml index 82e2f48..a6e5403 100644 --- a/.github/workflows/freebsd.yml +++ b/.github/workflows/freebsd.yml @@ -8,30 +8,29 @@ on: jobs: test: - runs-on: macos-12 + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - version: [13, 12] - + freebsd-version: ['14.1', '14.0', '13.3', '13.2'] + steps: - uses: actions/checkout@v4 - - uses: actions/cache@v4 - with: - path: ~/.vagrant.d/boxes - key: vagrant-generic-freebsd-${{ matrix.version }} - restore-keys: | - vagrant-generic-freebsd-${{ matrix.version }} - - - uses: leleliu008/github-actions-vagrant@main + - uses: cross-platform-actions/action@v0.25.0 with: - mem: 2048 - box: generic/freebsd${{ matrix.version }} + operating_system: freebsd + version: ${{ matrix.freebsd-version }} + shell: bash run: | - run pkg update - run pkg install -y curl libnghttp2 gcc + run() { + printf "\033[0;35m==>\033[0m \033[0;32m%b\n\033[0m" "$*" + eval "$@" + } + + run sudo pkg update + run sudo pkg install -y curl libnghttp2 gcc run ./ppkg --help run ./ppkg --version diff --git a/.github/workflows/netbsd.yml b/.github/workflows/netbsd.yml index 7c20398..ccd6351 100644 --- a/.github/workflows/netbsd.yml +++ b/.github/workflows/netbsd.yml @@ -8,28 +8,27 @@ on: jobs: test: - runs-on: macos-12 - + runs-on: ubuntu-latest + strategy: fail-fast: false matrix: - version: [9] + netbsd-version: ['10.0', '9.4', '9.3', '9.2'] steps: - uses: actions/checkout@v4 - - uses: actions/cache@v4 - with: - path: ~/.vagrant.d/boxes - key: vagrant-generic-netbsd-${{ matrix.version }} - restore-keys: | - vagrant-generic-netbsd-${{ matrix.version }} - - - uses: leleliu008/github-actions-vagrant@main + - uses: cross-platform-actions/action@v0.25.0 with: - mem: 2048 - box: generic/netbsd${{ matrix.version }} + operating_system: netbsd + version: ${{ matrix.netbsd-version }} + shell: bash run: | + run() { + printf "\033[0;35m==>\033[0m \033[0;32m%b\n\033[0m" "$*" + eval "$@" + } + run sudo sed -i 's/#ETCCERTSDIR=/ETCCERTSDIR=/' /usr/pkg/etc/ca-certificates-dir.conf run sudo update-ca-certificates diff --git a/.github/workflows/openbsd.yml b/.github/workflows/openbsd.yml index 0aa952c..2c8701d 100644 --- a/.github/workflows/openbsd.yml +++ b/.github/workflows/openbsd.yml @@ -8,24 +8,27 @@ on: jobs: test: - runs-on: macos-12 - + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + openbsd-version: ['7.5', '7.4', '7.3', '7.2'] + steps: - uses: actions/checkout@v4 - - uses: actions/cache@v4 + - uses: cross-platform-actions/action@v0.25.0 with: - path: ~/.vagrant.d/boxes - key: vagrant-generic-openbsd-7 - restore-keys: | - vagrant-generic-openbsd-7 - - - uses: leleliu008/github-actions-vagrant@main - with: - mem: 2048 - box: generic/openbsd7 - box-version: 4.2.16 + operating_system: openbsd + version: ${{ matrix.openbsd-version }} + shell: bash run: | + run() { + printf "\033[0;35m==>\033[0m \033[0;32m%b\n\033[0m" "$*" + eval "$@" + } + run sudo pkg_add curl gtar-- gcc%11 run sudo ln -s /usr/local/bin/gtar /usr/bin/tar