Skip to content

Commit

Permalink
Moved Freebsd 14 from cirrus to gh, openbsd build without auditable
Browse files Browse the repository at this point in the history
  • Loading branch information
michalszmidt committed Dec 4, 2023
1 parent ebc5b49 commit 86dc4aa
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 47 deletions.
43 changes: 0 additions & 43 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,49 +63,6 @@ task:
- ls -lah
- files_to_upload=($(ls | grep hctl)); . ./upload.sh

task:
name: FreebsdAmd64
only_if: $CIRRUS_BRANCH == 'master'
only_if: $CIRRUS_RELEASE != ''
env:
GITHUB_TOKEN: ENCRYPTED[c55719815e6b9431df4596dc746645ece3acbd2917ffa29c71a1636d232aa77b7a3684b31667de46f028ca594d7a4b20]
CARGO_TERM_COLOR: always
freebsd_instance:
image_family: freebsd-14-0
prepare_script:
- whoami
- freebsd-version
- uname -a
- ls -lah
- mkdir -p /usr/local/etc/pkg/repos
- cp ./FreeBSD.conf /usr/local/etc/pkg/repos/
- pkg update
- pkg upgrade -y
- pkg install -y curl pkgconf openssl bash chrony
- echo "chronyd_enable="YES"" >> /etc/rc.conf
- service chronyd start
- chronyc -a makestep
- export HOME="/root"
- curl https://sh.rustup.rs -sSf | sh -s -- -y
- . $HOME/.cargo/env
- cargo install cargo-auditable cargo-audit
build_script:
- whoami
- . $HOME/.cargo/env
- ls -lah
- rustc --version
- cargo auditable build --release --locked
hash_script:
- whoami
- cd target/release
- mv hctl hctl-freebsd-amd64
- sha256sum hctl-freebsd-amd64 > sha256-hctl-freebsd-amd64
- mv hctl-freebsd-amd64 ../../ && mv sha256-hctl-freebsd-amd64 ../../
upload_script:
- whoami
- ls -lah
- files_to_upload=($(ls | grep hctl)); . ./upload.sh

task:
name: MacosxSilicon
only_if: $CIRRUS_BRANCH == 'master'
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/release_freebsd_amd64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release for FreeBSD amd64

on:
push:
tags:
- '*'

jobs:
build_freebsd:
runs-on: ubuntu-latest
name: Build for FreeBSD
steps:
- uses: actions/checkout@v4
- name: Compile in FreeBSD VM
id: compile
uses: vmactions/freebsd-vm@v1
with:
usesh: false
release: 14.0
mem: 8192
prepare: |
whoami
mkdir -p /usr/local/etc/pkg/repos
cp ./FreeBSD.conf /usr/local/etc/pkg/repos/
pkg update
pkg upgrade -y
pkg install -y curl pkgconf openssl bash
curl https://sh.rustup.rs -sSf | sh -s -- -y
. $HOME/.cargo/env
cargo install cargo-auditable cargo-audit
run: |
whoami
. $HOME/.cargo/env
ls -lah
rustc --version
cargo auditable build --release --locked
cd target/release
mv hctl hctl-freebsd-amd64
sha256sum hctl-freebsd-amd64 > sha256-hctl-freebsd-amd64
mv hctl-freebsd-amd64 ../../ && mv sha256-hctl-freebsd-amd64 ../../
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/hctl-freebsd-amd64
asset_name: hctl-freebsd-amd64
tag: ${{ github.ref }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/sha256-hctl-freebsd-amd64
asset_name: sha256-hctl-freebsd-amd64
tag: ${{ github.ref }}
7 changes: 4 additions & 3 deletions .github/workflows/release_openbsd_amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ jobs:
usesh: false
mem: 8192
prepare: |
pkg_add curl gcc g++ pkgconf coreutils p5-Digest-SHA3 rust cargo-audit
cargo install cargo-auditable cargo-audit
pkg_add curl gcc g++ pkgconf coreutils p5-Digest-SHA3 rust
which gcc
which g++
run: |
ls -lah
whoami
rustc --version
cargo auditable build --release --locked
cargo build --release --locked
cd target/release
mv hctl hctl-openbsd-amd64
sha256sum hctl-openbsd-amd64 > sha256-hctl-openbsd-amd64
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Packaging progress [issue](https://github.com/michalszmidt/hctl/issues/9)
| [![Build Status](https://img.shields.io/github/actions/workflow/status/michalszmidt/hctl/release_linux_musl_amd64.yml)](https://github.com/michalszmidt/hctl/actions) | [![Build Status](https://api.cirrus-ci.com/github/michalszmidt/hctl.svg?task=LinuxMuslAarch64)](https://cirrus-ci.com/github/michalszmidt/hctl) |
| [![Build Status](https://img.shields.io/github/actions/workflow/status/michalszmidt/hctl/release_macosx_amd64.yml)](https://github.com/michalszmidt/hctl/actions) | [![Build Status](https://api.cirrus-ci.com/github/michalszmidt/hctl.svg?task=MacosxSilicon)](https://cirrus-ci.com/github/michalszmidt/hctl) |
| [![Build Status](https://img.shields.io/github/actions/workflow/status/michalszmidt/hctl/release_windows_amd64.yml)](https://github.com/michalszmidt/hctl/actions) | [![Build Status](https://img.shields.io/github/actions/workflow/status/michalszmidt/hctl/release_windows_aarch64.yml)](https://github.com/michalszmidt/hctl/actions) |
| [![Build Status](https://api.cirrus-ci.com/github/michalszmidt/hctl.svg?task=FreebsdAmd64)](https://cirrus-ci.com/github/michalszmidt/hctl) | NSU |
| [![Build Status](https://img.shields.io/github/actions/workflow/status/michalszmidt/hctl/release_freebsd_amd64.yml)](https://github.com/michalszmidt/hctl/actions) | NSU |
| [![Build Status](https://img.shields.io/github/actions/workflow/status/michalszmidt/hctl/release_netbsd_amd64.yml)](https://github.com/michalszmidt/hctl/actions) | NSU |
| [![Build Status](https://img.shields.io/github/actions/workflow/status/michalszmidt/hctl/release_openbsd_amd64.yml)](https://github.com/michalszmidt/hctl/actions) | NSU |

Expand Down

0 comments on commit 86dc4aa

Please sign in to comment.