Skip to content

Commit

Permalink
feat: add aarch64-apple-darwin build (dprint#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarshgupta137 committed Jan 30, 2024
1 parent ab8be78 commit 7fc3c24
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ const profileDataItems: ProfileData[] = [{
os: OperatingSystem.Mac,
target: "x86_64-apple-darwin",
runTests: true,
}, {
os: OperatingSystem.Mac,
target: "aarch64-apple-darwin",
runTests: true,
}, {
os: OperatingSystem.Windows,
target: "x86_64-pc-windows-msvc",
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
run_tests: "true"
cross: "false"
target: x86_64-apple-darwin
- os: macOS-latest
run_tests: "true"
cross: "true"
target: aarch64-apple-darwin
- os: windows-latest
run_tests: "true"
cross: "false"
Expand All @@ -38,6 +42,7 @@ jobs:
target: aarch64-unknown-linux-gnu
outputs:
ZIP_CHECKSUM_X86_64_APPLE_DARWIN: "${{steps.pre_release_x86_64_apple_darwin.outputs.ZIP_CHECKSUM}}"
ZIP_CHECKSUM_AARCH64_APPLE_DARWIN: "${{steps.pre_release_aarch64_apple_darwin.outputs.ZIP_CHECKSUM}}"
ZIP_CHECKSUM_X86_64_PC_WINDOWS_MSVC: "${{steps.pre_release_x86_64_pc_windows_msvc.outputs.ZIP_CHECKSUM}}"
ZIP_CHECKSUM_X86_64_UNKNOWN_LINUX_GNU: "${{steps.pre_release_x86_64_unknown_linux_gnu.outputs.ZIP_CHECKSUM}}"
ZIP_CHECKSUM_AARCH64_UNKNOWN_LINUX_GNU: "${{steps.pre_release_aarch64_unknown_linux_gnu.outputs.ZIP_CHECKSUM}}"
Expand Down Expand Up @@ -91,6 +96,13 @@ jobs:
cd target/x86_64-apple-darwin/release
zip -r dprint-plugin-prettier-x86_64-apple-darwin.zip dprint-plugin-prettier
echo "::set-output name=ZIP_CHECKSUM::$(shasum -a 256 dprint-plugin-prettier-x86_64-apple-darwin.zip | awk '{print $1}')"
- name: Pre-release (aarch64-apple-darwin)
id: pre_release_aarch64_apple_darwin
if: "matrix.config.target == 'aarch64-apple-darwin' && startsWith(github.ref, 'refs/tags/')"
run: |-
cd target/aarch64-apple-darwin/release
zip -r dprint-plugin-prettier-aarch64-apple-darwin.zip dprint-plugin-prettier
echo "::set-output name=ZIP_CHECKSUM::$(shasum -a 256 dprint-plugin-prettier-aarch64-apple-darwin.zip | awk '{print $1}')"
- name: Pre-release (x86_64-pc-windows-msvc)
id: pre_release_x86_64_pc_windows_msvc
if: "matrix.config.target == 'x86_64-pc-windows-msvc' && startsWith(github.ref, 'refs/tags/')"
Expand All @@ -117,6 +129,12 @@ jobs:
with:
name: x86_64-apple-darwin-artifacts
path: target/x86_64-apple-darwin/release/dprint-plugin-prettier-x86_64-apple-darwin.zip
- name: Upload artifacts (aarch64-apple-darwin)
if: "matrix.config.target == 'aarch64-apple-darwin' && startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v2
with:
name: aarch64-apple-darwin-artifacts
path: target/aarch64-apple-darwin/release/dprint-plugin-prettier-aarch64-apple-darwin.zip
- name: Upload artifacts (x86_64-pc-windows-msvc)
if: "matrix.config.target == 'x86_64-pc-windows-msvc' && startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -149,12 +167,14 @@ jobs:
- name: Move downloaded artifacts to root directory
run: |-
mv x86_64-apple-darwin-artifacts/dprint-plugin-prettier-x86_64-apple-darwin.zip .
mv aarch64-apple-darwin-artifacts/dprint-plugin-prettier-aarch64-apple-darwin.zip .
mv x86_64-pc-windows-msvc-artifacts/dprint-plugin-prettier-x86_64-pc-windows-msvc.zip .
mv x86_64-unknown-linux-gnu-artifacts/dprint-plugin-prettier-x86_64-unknown-linux-gnu.zip .
mv aarch64-unknown-linux-gnu-artifacts/dprint-plugin-prettier-aarch64-unknown-linux-gnu.zip .
- name: Output checksums
run: |-
echo "dprint-plugin-prettier-x86_64-apple-darwin.zip: ${{needs.build.outputs.ZIP_CHECKSUM_X86_64_APPLE_DARWIN}}"
echo "dprint-plugin-prettier-aarch64-apple-darwin.zip: ${{needs.build.outputs.ZIP_CHECKSUM_AARCH64_APPLE_DARWIN}}"
echo "dprint-plugin-prettier-x86_64-pc-windows-msvc.zip: ${{needs.build.outputs.ZIP_CHECKSUM_X86_64_PC_WINDOWS_MSVC}}"
echo "dprint-plugin-prettier-x86_64-unknown-linux-gnu.zip: ${{needs.build.outputs.ZIP_CHECKSUM_X86_64_UNKNOWN_LINUX_GNU}}"
echo "dprint-plugin-prettier-aarch64-unknown-linux-gnu.zip: ${{needs.build.outputs.ZIP_CHECKSUM_AARCH64_UNKNOWN_LINUX_GNU}}"
Expand All @@ -173,6 +193,7 @@ jobs:
with:
files: |-
dprint-plugin-prettier-x86_64-apple-darwin.zip
dprint-plugin-prettier-aarch64-apple-darwin.zip
dprint-plugin-prettier-x86_64-pc-windows-msvc.zip
dprint-plugin-prettier-x86_64-unknown-linux-gnu.zip
dprint-plugin-prettier-aarch64-unknown-linux-gnu.zip
Expand Down
1 change: 1 addition & 0 deletions scripts/create_plugin_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ await processPlugin.createDprintOrgProcessPlugin({
version: new CargoToml(cargoFilePath).version(),
platforms: [
"darwin-x86_64",
"darwin-aarch64",
"linux-x86_64",
"linux-aarch64",
"windows-x86_64",
Expand Down

0 comments on commit 7fc3c24

Please sign in to comment.