-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: leleliu008 <[email protected]>
- Loading branch information
1 parent
b17eff9
commit 6530c97
Showing
29 changed files
with
246 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,155 +47,89 @@ jobs: | |
needs: check | ||
if: needs.check.outputs.if-has-new-commit == 'yes' | ||
|
||
runs-on: macos-12 | ||
|
||
steps: | ||
- uses: leleliu008/github-actions-vagrant@main | ||
with: | ||
mem: 8192 | ||
box: generic/netbsd9 | ||
run: | | ||
export HOME=/home/vagrant | ||
run sudo sed -i 's/#ETCCERTSDIR=/ETCCERTSDIR=/' /usr/pkg/etc/ca-certificates-dir.conf | ||
run sudo update-ca-certificates | ||
unset ETCCERTSDIR | ||
ETCCERTSDIR=$(sed -n '/^ETCCERTSDIR=/p' /usr/pkg/etc/ca-certificates-dir.conf | sed 's|ETCCERTSDIR=\(.*\)|\1|') | ||
if [ -n "$ETCCERTSDIR" ] ; then | ||
export SSL_CERT_FILE="$ETCCERTSDIR/ca-certificates.crt" | ||
fi | ||
run sudo pkgin -y update | ||
run sudo pkgin -y install llvm | ||
runs-on: ubuntu-latest | ||
|
||
run curl -LO https://raw.githubusercontent.com/leleliu008/ppkg/master/ppkg | ||
run chmod a+x ppkg | ||
run ./ppkg setup | ||
run ./ppkg update | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# https://ftp.netbsd.org/pub/NetBSD/ | ||
target-version: ['9.1', '9.2', '9.3'] | ||
|
||
~/.uppm/installed/gsed/bin/gsed -i "/git-url/a git-sha: ${{ needs.check.outputs.git-sha }}" ~/.ppkg/repos.d/offical-core/formula/uppm.yml | ||
steps: | ||
- run: curl -LO https://raw.githubusercontent.com/leleliu008/ppkg/master/ppkg | ||
- run: chmod a+x ppkg | ||
- run: ./ppkg setup | ||
- run: ./ppkg update | ||
|
||
run ./ppkg install uppm --link-type=static-only --install-lib=static | ||
run ./ppkg pack uppm | ||
- run: | | ||
~/.uppm/installed/gsed/bin/gsed -i "/git-url/a git-sha: ${{ needs.check.outputs.git-sha }}" ~/.ppkg/repos.d/offical-core/formula/uppm.yml | ||
- run: scp -i $VAGRANT_CWD/.vagrant/machines/default/virtualbox/private_key -o StrictHostKeyChecking=no -r -P 2222 [email protected]:/home/vagrant/.ppkg/packed/uppm-*-netbsd-amd64.tar.xz . | ||
- run: ./ppkg install netbsd-${{ matrix.target-version }}-amd64/uppm --link-type=static-full | ||
- run: ./ppkg pack netbsd-${{ matrix.target-version }}-amd64/uppm | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: uppm---netbsd-amd64-tar-xz | ||
path: uppm-*-netbsd-amd64.tar.xz | ||
name: uppm---netbsd-${{ matrix.target-version }}-amd64-tar-xz | ||
path: uppm-*-netbsd-${{ matrix.target-version }}-amd64.tar.xz | ||
|
||
|
||
openbsd-amd64: | ||
needs: [check, netbsd-amd64] | ||
if: needs.check.outputs.if-has-new-commit == 'yes' | ||
|
||
runs-on: macos-12 | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
VAGRANT_LOG: info | ||
# https://www.vagrantup.com/docs/other/debugging | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# https://cdn.openbsd.org/pub/OpenBSD/ | ||
target-version: ['7.2', '7.3', '7.4'] | ||
|
||
steps: | ||
- run: | | ||
echo 'set -e' > shell.sh | ||
export -p | grep 'GITHUB_' >> shell.sh | ||
cat >> shell.sh <<'EOF' | ||
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 | ||
export HOME=/home/vagrant | ||
export LD_LIBRARY_PATH=/usr/local/lib | ||
run cd /home/vagrant/${{ github.repository }} | ||
run curl -LO https://raw.githubusercontent.com/leleliu008/ppkg/master/ppkg | ||
run chmod a+x ppkg | ||
run ./ppkg setup | ||
run ./ppkg update | ||
~/.uppm/installed/gsed/bin/gsed -i "/git-url/a git-sha: ${{ needs.check.outputs.git-sha }}" ~/.ppkg/repos.d/offical-core/formula/uppm.yml | ||
run ./ppkg install uppm --link-type=static-only --install-lib=static | ||
run ./ppkg pack uppm -o . | ||
ls uppm-*-openbsd-amd64.tar.xz > name.txt | ||
run curl -LO https://raw.githubusercontent.com/emikulic/darkhttpd/master/darkhttpd.c | ||
run cc -o darkhttpd darkhttpd.c | ||
run ./darkhttpd . --port 8080 & | ||
EOF | ||
cat shell.sh | ||
- run: curl -LO https://raw.githubusercontent.com/leleliu008/ppkg/master/ppkg | ||
- run: chmod a+x ppkg | ||
- run: ./ppkg setup | ||
- run: ./ppkg update | ||
|
||
- run: | | ||
tee Vagrantfile <<EOF | ||
Vagrant.configure("2") do |config| | ||
config.vm.box = "generic/openbsd7" | ||
config.vm.provider "virtualbox" do |vb| | ||
vb.memory = "8192" | ||
end | ||
config.vm.network "forwarded_port", guest: 8080, host: 8080 | ||
config.vm.synced_folder ".", "/home/vagrant/${{ github.repository }}", type: "rsync" | ||
config.vm.provision "shell", path: "shell.sh" | ||
end | ||
EOF | ||
- run: vagrant up --provider virtualbox --provision | ||
~/.uppm/installed/gsed/bin/gsed -i "/git-url/a git-sha: ${{ needs.check.outputs.git-sha }}" ~/.ppkg/repos.d/offical-core/formula/uppm.yml | ||
- run: curl -O http://localhost:8080/name.txt | ||
- run: curl -O http://localhost:8080/$(cat name.txt) | ||
- run: ./ppkg install openbsd-${{ matrix.target-version }}-amd64/uppm --link-type=static-most | ||
- run: ./ppkg pack openbsd-${{ matrix.target-version }}-amd64/uppm | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: uppm---openbsd-amd64-tar-xz | ||
path: uppm-*-openbsd-amd64.tar.xz | ||
|
||
name: uppm---openbsd-${{ matrix.target-version }}-amd64-tar-xz | ||
path: uppm-*-openbsd-${{ matrix.target-version }}-amd64.tar.xz | ||
|
||
freebsd-amd64: | ||
needs: [check, openbsd-amd64] | ||
if: needs.check.outputs.if-has-new-commit == 'yes' | ||
|
||
runs-on: macos-12 | ||
|
||
steps: | ||
- uses: leleliu008/github-actions-vagrant@main | ||
with: | ||
mem: 8192 | ||
box: generic/freebsd13 | ||
run: | | ||
export HOME=/home/vagrant | ||
run pkg install -y gcc curl libnghttp2 | ||
runs-on: ubuntu-latest | ||
|
||
run curl -LO https://raw.githubusercontent.com/leleliu008/ppkg/master/ppkg | ||
run chmod a+x ppkg | ||
run ./ppkg setup | ||
run ./ppkg update | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# https://archive.freebsd.org/old-releases/amd64/ | ||
target-version: ['13.0', '13.1', '13.2'] | ||
|
||
~/.uppm/installed/gsed/bin/gsed -i "/git-url/a git-sha: ${{ needs.check.outputs.git-sha }}" ~/.ppkg/repos.d/offical-core/formula/uppm.yml | ||
steps: | ||
- run: curl -LO https://raw.githubusercontent.com/leleliu008/ppkg/master/ppkg | ||
- run: chmod a+x ppkg | ||
- run: ./ppkg setup | ||
- run: ./ppkg update | ||
|
||
run ./ppkg install uppm --link-type=static-only --install-lib=static | ||
run ./ppkg pack uppm | ||
- run: | | ||
~/.uppm/installed/gsed/bin/gsed -i "/git-url/a git-sha: ${{ needs.check.outputs.git-sha }}" ~/.ppkg/repos.d/offical-core/formula/uppm.yml | ||
- run: scp -i $VAGRANT_CWD/.vagrant/machines/default/virtualbox/private_key -o StrictHostKeyChecking=no -r -P 2222 [email protected]:/home/vagrant/.ppkg/packed/uppm-*-freebsd-amd64.tar.xz . | ||
- run: ./ppkg install freebsd-${{ matrix.target-version }}-amd64/uppm --link-type=static-full | ||
- run: ./ppkg pack freebsd-${{ matrix.target-version }}-amd64/uppm | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: uppm---freebsd-amd64-tar-xz | ||
path: uppm-*-freebsd-amd64.tar.xz | ||
name: uppm---freebsd-${{ matrix.target-version }}-amd64-tar-xz | ||
path: uppm-*-freebsd-${{ matrix.target-version }}-amd64.tar.xz | ||
|
||
|
||
macos: | ||
|
@@ -488,19 +422,52 @@ jobs: | |
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: uppm---netbsd-amd64-tar-xz | ||
name: uctags---netbsd-9.1-amd64-tar-xz | ||
path: . | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: uppm---openbsd-amd64-tar-xz | ||
name: uctags---netbsd-9.2-amd64-tar-xz | ||
path: . | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: uppm---freebsd-amd64-tar-xz | ||
name: uctags---netbsd-9.3-amd64-tar-xz | ||
path: . | ||
|
||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: uctags---openbsd-7.2-amd64-tar-xz | ||
path: . | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: uctags---openbsd-7.3-amd64-tar-xz | ||
path: . | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: uctags---openbsd-7.4-amd64-tar-xz | ||
path: . | ||
|
||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: uctags---freebsd-13.0-amd64-tar-xz | ||
path: . | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: uctags---freebsd-13.1-amd64-tar-xz | ||
path: . | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: uctags---freebsd-13.2-amd64-tar-xz | ||
path: . | ||
|
||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: uppm---macos10.15-x86_64-tar-xz | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.