feat: fix .so for linux #53
This file contains hidden or 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
| name: Build Packages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - '*' | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| package-deb: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - ubuntu_version: "24.04" | |
| container_tag: "ubuntu24.04" | |
| deb_codename: "noble" | |
| - ubuntu_version: "25.10" | |
| container_tag: "ubuntu25.10" | |
| deb_codename: "questing" | |
| - ubuntu_version: "26.04" | |
| container_tag: "ubuntu26.04" | |
| deb_codename: "resolute" | |
| container: | |
| image: ghcr.io/fastflowlm/fastflowlm/build-environment:${{ matrix.container_tag }} | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Configure git safe directory | |
| run: git config --global --add safe.directory $(pwd) | |
| - name: Get version from git describe | |
| id: get_version | |
| run: | | |
| VERSION=$(git describe --tags --always) | |
| # Strip leading 'v' for Debian version compatibility | |
| DEB_VERSION=$(echo "${VERSION}" | sed 's/^v//') | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| echo "deb_version=${DEB_VERSION}" >> $GITHUB_OUTPUT | |
| - name: Get short SHA | |
| id: short_sha | |
| run: echo "sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT | |
| - name: Create Debian packaging metadata | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| sed -e "s|@@DEB_VERSION@@|${{ steps.get_version.outputs.deb_version }}|g" \ | |
| -e "s|@@DEB_CODENAME@@|${{ matrix.deb_codename }}|g" \ | |
| -e "s|@@DEB_DATE@@|$(date -R)|g" \ | |
| debian/changelog.in > debian/changelog | |
| chmod +x debian/rules | |
| - name: Upgrade Rust toolchain (24.04) | |
| if: ${{ matrix.ubuntu_version == '24.04' }} | |
| run: | | |
| apt-get update | |
| apt-get install -y --no-install-recommends curl ca-certificates | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ | |
| sh -s -- -y --profile minimal --default-toolchain stable | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| rustc --version | |
| - name: Build Debian package | |
| working-directory: ${{ github.workspace }} | |
| env: | |
| DEBEMAIL: noreply@example.com | |
| DEBFULLNAME: fastflowlm | |
| DEB_VERSION: ${{ steps.get_version.outputs.deb_version }} | |
| run: | | |
| dpkg-buildpackage -b -us -uc | |
| mv ../fastflowlm_${DEB_VERSION}_amd64.deb ./fastflowlm_${DEB_VERSION}_ubuntu${{ matrix.ubuntu_version }}_amd64.deb | |
| ls -lah ./fastflowlm_${DEB_VERSION}_ubuntu${{ matrix.ubuntu_version }}_amd64.deb | |
| - name: Upload Debian package artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: flm-ubuntu${{ matrix.ubuntu_version }}-${{ steps.short_sha.outputs.sha }}-deb | |
| path: ./fastflowlm_${{ steps.get_version.outputs.deb_version }}_ubuntu${{ matrix.ubuntu_version }}_amd64.deb | |
| if-no-files-found: error | |
| release: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| needs: package-deb | |
| if: github.ref_type == 'tag' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get version from git describe | |
| id: get_version | |
| run: | | |
| VERSION=$(git describe --tags --always) | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| - name: Download all deb artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: debs | |
| pattern: '*-deb' | |
| - name: Upload Binaries to Release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ github.ref }} | |
| file_glob: true | |
| file: debs/*/*.deb |