feat: create libm.a instead of ld script on x86_64 for gnu static linkage #336
Workflow file for this run
This file contains 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 and release | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
REGISTRY: ghcr.io | |
WORKSPACE: matter-labs | |
IMAGE_NAME: llvm_runner | |
jobs: | |
handle_image: | |
runs-on: matterlabs-default-infra-runners | |
permissions: | |
contents: read | |
packages: write | |
attestations: write | |
id-token: write | |
strategy: | |
# Keep matrix for future purposes | |
# now, we need only the latest version | |
matrix: | |
image_version: [ "ubuntu22-llvm17" ] | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: hadolint/hadolint-action@v3.1.0 | |
with: | |
dockerfile: images/${{ env.IMAGE_NAME }}/${{ matrix.image_version }}.Dockerfile | |
ignore: DL4006 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
platforms: 'linux/amd64,linux/arm64' | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.WORKSPACE }}/${{ env.IMAGE_NAME }}/${{ matrix.image_version }} | |
flavor: latest=true | |
- name: Build and push Docker image | |
id: push | |
uses: docker/build-push-action@v5 | |
with: | |
push: ${{ github.event_name == 'push' }} | |
file: images/${{ env.IMAGE_NAME }}/${{ matrix.image_version }}.Dockerfile | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
platforms: 'linux/amd64,linux/arm64' | |
- name: Generate artifact attestation | |
if: github.event_name == 'push' | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-name: ${{ env.REGISTRY }}/${{ env.WORKSPACE }}/${{ env.IMAGE_NAME }}/${{ matrix.image_version }} | |
subject-digest: ${{ steps.push.outputs.digest }} | |
push-to-registry: true |