Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

24 arm64 support #26

Merged
merged 6 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading