Skip to content

Commit

Permalink
Add -Z linker-features=-lld for x86_64-unknown-linux-gnu release bu…
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed May 22, 2024
1 parent 80889d7 commit bbb4432
Showing 1 changed file with 51 additions and 50 deletions.
101 changes: 51 additions & 50 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ jobs:
os: ubuntu-latest
name: autocorrect-linux-amd64.tar.gz
arch: x86_64
rustflags: "-Z linker-features=-lld"

- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
name: autocorrect-linux-arm64.tar.gz
arch: aarch64
rustflags: "-Z linker-features=-lld"

- target: x86_64-apple-darwin
os: macOS-latest
Expand Down Expand Up @@ -55,10 +57,9 @@ jobs:
# arch: aarch64

runs-on: ${{ matrix.os }}
continue-on-error: true
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: olegtarasov/get-tag@v2.1
id: tagName
Expand Down Expand Up @@ -93,7 +94,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path autocorrect-cli/Cargo.toml --release --target ${{ matrix.target }} -Z unstable-options --config 'package.version="${{ steps.tagName.outputs.version }}"'
args: --manifest-path autocorrect-cli/Cargo.toml --release --target ${{ matrix.target }} -Z unstable-options --config 'package.version="${{ steps.tagName.outputs.version }}"' ${{ matrix.rustflags }}
use-cross: ${{ matrix.os == 'ubuntu-latest' }}

- name: Prepare artifacts [Windows]
Expand Down Expand Up @@ -140,7 +141,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -154,49 +155,49 @@ jobs:
ls -lha release-dist
for file in release-dist/**/*; do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: release-dist/**/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docker:
runs-on: ubuntu-latest
needs: github_release
steps:
- uses: olegtarasov/get-tag@v2.1
id: tagName

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: |
huacnlee/autocorrect:latest
huacnlee/autocorrect:${{ steps.tagName.outputs.tag }}
- name: Build and push (reviewdog)
uses: docker/build-push-action@v2
with:
push: true
file: ./Dockerfile.reviewdog
tags: |
huacnlee/autocorrect:latest-reviewdog
huacnlee/autocorrect:${{ steps.tagName.outputs.tag }}-reviewdog
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
# - name: Publish
# uses: softprops/action-gh-release@v1
# with:
# files: release-dist/**/*
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# docker:
# runs-on: ubuntu-latest
# needs: github_release
# steps:
# - uses: olegtarasov/get-tag@v2.1
# id: tagName

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1

# - name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Build and push
# id: docker_build
# uses: docker/build-push-action@v2
# with:
# push: true
# tags: |
# huacnlee/autocorrect:latest
# huacnlee/autocorrect:${{ steps.tagName.outputs.tag }}

# - name: Build and push (reviewdog)
# uses: docker/build-push-action@v2
# with:
# push: true
# file: ./Dockerfile.reviewdog
# tags: |
# huacnlee/autocorrect:latest-reviewdog
# huacnlee/autocorrect:${{ steps.tagName.outputs.tag }}-reviewdog

# - name: Image digest
# run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit bbb4432

Please sign in to comment.