fix: add explicit LD flag -latomic to cmake build #92
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: musl-dyne | |
| on: | |
| push: | |
| paths-ignore: | |
| - '*.md' | |
| branches: | |
| - master | |
| pull_request: | |
| paths-ignore: | |
| - '*.md' | |
| branches: | |
| - master | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| semantic-release: | |
| name: 🤖 Semantic release | |
| runs-on: ubuntu-latest | |
| outputs: | |
| new_release_published: ${{ steps.semantic-release.outputs.new_release_published }} | |
| new_release_version: ${{ steps.semantic-release.outputs.new_release_version }} | |
| if: ${{ github.ref_name == 'master' && github.event_name == 'push' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Semantic Release | |
| uses: cycjimmy/semantic-release-action@v4 | |
| id: semantic-release | |
| with: | |
| extra_plugins: | | |
| @semantic-release/changelog | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| gcc-musl-build: | |
| name: 🐧 Build release | |
| runs-on: ubuntu-latest | |
| needs: [semantic-release] | |
| if: ${{ needs.semantic-release.outputs.new_release_published == 'true' }} | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-linux-musl | |
| output: x86_64 | |
| - target: arm-linux-musleabihf | |
| output: arm_hf | |
| - target: riscv64-linux-musl | |
| output: riscv_64 | |
| - target: aarch64-linux-musl | |
| output: arm_64 | |
| fail-fast: true | |
| env: | |
| CCACHE_DIR: /alpine/root/.cache/ccache | |
| XZ_OPT: -9e -T0 | |
| TARGET: ${{ matrix.target }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: prepare ccache in alpine chroot | |
| run: | | |
| sudo mkdir -p /alpine/root/.cache/ccache | |
| sudo chmod -R a+rw /alpine/root/.cache | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| - name: Build chroot ${{ matrix.target }} | |
| run: | | |
| sudo make chroot | |
| echo "export ARCH=\"${{ matrix.target }}\"" | sudo tee /alpine/etc/profile | |
| - name: Build gcc-musl ${{ matrix.target }} | |
| run: | | |
| /alpine/enter-chroot make gcc | |
| - name: Build libs ${{ matrix.target }} | |
| run: | | |
| /alpine/enter-chroot make libs | |
| - name: Prepare ${{ matrix.target }} | |
| run: | | |
| /alpine/enter-chroot make prepare | |
| - name: Compress the package | |
| run: | | |
| echo "Compressing: dyne-gcc-musl-${{ matrix.output }}.tar.xz" | |
| tar -cJf dyne-gcc-musl-${{ matrix.output }}.tar.xz dyne | |
| - name: Upload release artifacts dyne-gcc-musl-${{ matrix.output }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-${{ matrix.output }} | |
| path: | | |
| dyne-gcc-musl-${{ matrix.output }}.tar.xz | |
| draft-binary-release: | |
| name: 📦 Upload release | |
| needs: [semantic-release, gcc-musl-build] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: download binary artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: | | |
| dyne-gcc-musl | |
| - name: show directory structure | |
| run: tree -dL 3 dyne-gcc-musl | |
| - name: compute sha256 hash checksums | |
| run: | | |
| mkdir -p dyne-gcc-musl/checksums | |
| find dyne-gcc-musl -type f -exec sha256sum {} \; | awk '{ split($2, a, "/"); print $1, a[length(a)] }' | tee dyne-gcc-musl/checksums/SHA256SUMS.txt | |
| - name: upload releases to files.dyne.org | |
| uses: appleboy/scp-action@v1 | |
| with: | |
| host: ${{ secrets.FILES_SSH_HOST }} | |
| username: ${{ secrets.FILES_SSH_USER }} | |
| key: ${{ secrets.FILES_SSH_KEY }} | |
| port: ${{ secrets.FILES_SSH_PORT }} | |
| # scp-drone uploads dirs if wildcards are in them, so here | |
| # we need to list uploaded files one by one. | |
| source: | | |
| dyne-gcc-musl/release-x86_64/dyne-gcc-musl-x86_64.tar.xz, | |
| dyne-gcc-musl/release-arm_hf/dyne-gcc-musl-arm_hf.tar.xz, | |
| dyne-gcc-musl/release-arm_64/dyne-gcc-musl-arm_64.tar.xz, | |
| dyne-gcc-musl/release-riscv_64/dyne-gcc-musl-riscv_64.tar.xz, | |
| dyne-gcc-musl/checksums/SHA256SUMS.txt | |
| target: | | |
| /srv/ftp/musl | |
| strip_components: 2 | |
| overwrite: true | |
| - name: relase all binary artifacts | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| dyne-gcc-musl/release-*/* | |
| dyne-gcc-musl/checksums/SHA256SUMS.txt | |
| tag_name: ${{ needs.semantic-release.outputs.new_release_version }} | |
| draft: false | |
| prerelease: false | |
| fail_on_unmatched_files: true | |
| generate_release_notes: true | |
| remove-tag-on-fail: | |
| name: 🧻 Remove tag on fail | |
| needs: [semantic-release, gcc-musl-build] | |
| runs-on: ubuntu-latest | |
| if: ${{ (failure() || cancelled()) && needs.semantic-release.outputs.new_release_published == 'True' }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Remove tag | |
| uses: dev-drprasad/delete-tag-and-release@v1.0 | |
| with: | |
| tag_name: ${{ needs.semantic-release.outputs.new_release_version }} | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| delete_release: false | |
| repo: dyne/musl |