Skip to content

Commit

Permalink
freebsd testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Jan 22, 2025
1 parent 4e7f461 commit b76b919
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/freebsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: TestFreeBSD

on:
[push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ["stable"] # ["nightly", "beta", "stable"] #
steps:
- uses: actions/checkout@v4
- name: Test in FreeBSD
id: test
uses: vmactions/freebsd-vm@v1
with:
usesh: true
sync: rsync
copyback: false
prepare: |
pkg install -y curl pkgconf glib
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf > install.sh
chmod +x install.sh
./install.sh -y --default-toolchain ${{ matrix.toolchain }}
run: |
. "$HOME/.cargo/env"
set -ex
# Add feature "nightly" if toolchain is nightly
if [ "${{ matrix.toolchain }}" = "nightly" ]; then
ARGS="$ARGS --features nightly"
fi
RUST_BACKTRACE=1 cargo +${{ matrix.toolchain }} fmt --all -- --check
RUST_BACKTRACE=1 cargo +${{ matrix.toolchain }} clippy --all-features --release -- -D warnings
RUST_BACKTRACE=1 cargo +${{ matrix.toolchain }} build --all-features --release --verbose
# Sync the built binary back to the host
rsync -avz target/release/overtls-bin ${{ github.workspace }}
- name: archive
run: |
mkdir -p pubdir
zip -j pubdir/overtls-x86_64-unknown-freebsd.zip ./overtls-bin ./config.json
- name: Publish
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: pubdir/*
name: Automated build of ${{ github.sha }}
tag_name: r${{ github.sha }}
draft: false
prerelease: true

0 comments on commit b76b919

Please sign in to comment.