Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build a release asset for FreeBSD #440

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 40 additions & 2 deletions .github/workflows/build_assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,43 @@ jobs:
tag: ${{ github.ref }}
overwrite: true



build_assets_freebsd:
name: Build assets - FreeBSD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Run in VM
uses: vmactions/freebsd-vm@v1
with:
release: "13.2"
usesh: true
prepare: |
pkg update
pkg install -y python311 rust
run: |
python3.11 -m venv .venv --upgrade-deps
. .venv/bin/activate
pip install -r requirements.txt
pip install .
python setup.py build
STATICCODECOV_LIB_PATH=$(find build/ -maxdepth 1 -type d -name 'lib.*' -print -quit | xargs -I {} sh -c "find {} -type f -name 'staticcodecov*' print -quit | sed 's|^./||'")
pip install pyinstaller
pyinstaller --add-binary ${STATICCODECOV_LIB_PATH}:. --copy-metadata codecov-cli --hidden-import staticcodecov_languages -F codecov_cli/main.py
cp ./dist/main ./dist/codecovcli_freebsd
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.3
if: inputs.release == false
with:
path: ./dist/codecovcli_freebsd
- name: Upload Release Asset
if: inputs.release == true
id: upload-release-asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./dist/codecovcli_freebsd
asset_name: codecovcli_freebsd
tag: ${{ github.ref }}
overwrite: true