diff --git a/.github/workflows/build_assets.yml b/.github/workflows/build_assets.yml index e541c5f3..8c7808bf 100644 --- a/.github/workflows/build_assets.yml +++ b/.github/workflows/build_assets.yml @@ -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