Skip to content

Commit

Permalink
Merge pull request #26 from IPdotSetAF/24-arm64-support
Browse files Browse the repository at this point in the history
24 arm64 support
  • Loading branch information
IPdotSetAF authored Nov 16, 2024
2 parents aa46e6f + 0ae67ea commit 16eb98a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
- name: Install cosign
uses: sigstore/cosign-installer@v3

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

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

Expand All @@ -51,6 +54,7 @@ jobs:
push: true
tags: ${{ needs.build-docker.outputs.tags }}
labels: ${{ needs.build-docker.outputs.labels }}
platforms: linux/amd64, linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max

Expand All @@ -70,14 +74,21 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v2
with:
prerelease: true
generate_release_notes: true
files: |
mssql-proxy-${{ github.ref_name }}-source.tar.gz
mssql-proxy-${{ github.ref_name }}-linux.tar.gz
mssql-proxy-${{ github.ref_name }}-windows.zip
mssql-proxy-${{ github.ref_name }}-linux-amd64.tar.gz
mssql-proxy-${{ github.ref_name }}-linux-arm64.tar.gz
build-linux:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- linux/amd64
- linux/arm64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -87,11 +98,13 @@ jobs:
- run: ./Tools/mssql-proxy/odbc-driver-installer.sh
- run: pyinstaller mssql-proxy.linux.spec
working-directory: Tools/mssql-proxy
- run: tar -czf mssql-proxy-${{ github.ref_name }}-linux.tar.gz Tools/mssql-proxy/dist
- id: name
run: echo "platform_name=$(echo ${{ matrix.platform }} | sed 's:/:-:g')" >> $GITHUB_OUTPUT
- run: tar -czf mssql-proxy-${{ github.ref_name }}-${{ steps.name.outputs.platform_name }}.tar.gz Tools/mssql-proxy/dist
- uses: actions/upload-artifact@v4
with:
name: build-linux
path: mssql-proxy-${{ github.ref_name }}-linux.tar.gz
name: build-${{ steps.name.outputs.platform_name }}
path: mssql-proxy-${{ github.ref_name }}-${{ steps.name.outputs.platform_name }}.tar.gz

build-windows:
runs-on: windows-latest
Expand Down Expand Up @@ -119,6 +132,9 @@ jobs:
steps:
- uses: actions/checkout@v4

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

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

Expand All @@ -128,13 +144,14 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
- name: Build Docker images
id: build-and-push
uses: docker/build-push-action@v6
with:
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64, linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
1 change: 1 addition & 0 deletions Tools/mssql-proxy/odbc-driver-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
case $(uname -m) in
x86_64) architecture="amd64" ;;
arm64) architecture="arm64" ;;
aarch64) architecture="arm64" ;;
*) architecture="unsupported" ;;
esac
if [[ "unsupported" == "$architecture" ]]; then
Expand Down

0 comments on commit 16eb98a

Please sign in to comment.