-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
131 additions
and
30 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,15 +35,24 @@ jobs: | |
# emacs-version: '27.2' | ||
- os: windows-2019 | ||
emacs-version: '27.2' | ||
- os: macos-11 | ||
emacs-version: '27.2' | ||
# Cross build | ||
target: aarch64-apple-darwin | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Set up Rust | ||
run: | | ||
rustup install stable | ||
rustc -Vv | ||
cargo -V | ||
- name: Set up Rust's cross-build target | ||
if: matrix.target | ||
run: | | ||
rustup target add ${{ matrix.target }} | ||
- uses: purcell/[email protected] | ||
# Using a specific commit hash to fix this https://github.com/purcell/setup-emacs/issues/24. | ||
- uses: purcell/setup-emacs@b56a75706e31e22d474357c77fb25ce73be2973a | ||
if: runner.os != 'Windows' | ||
with: | ||
version: ${{ matrix.emacs-version }} | ||
|
@@ -70,11 +79,13 @@ jobs: | |
- run: .github/script/setup-cask | ||
|
||
- run: bin/setup | ||
- run: bin/build | ||
- run: bin/build -target "${{ matrix.target }}" | ||
|
||
- run: bin/inspect-binaries | ||
continue-on-error: true | ||
|
||
- name: Install tree-sitter CLI | ||
if: ${{ !matrix.target }} | ||
run: npm install -g [email protected] | ||
- run: bin/test | ||
if: ${{ !matrix.target }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,24 +12,36 @@ jobs: | |
fail-fast: true | ||
matrix: | ||
include: | ||
# TODO: Get host platform from rustc instead of specifying it explicitly. | ||
- os: macos-10.15 | ||
emacs-version: '27.2' | ||
ext: dylib | ||
host: x86_64-apple-darwin | ||
- os: macos-11 | ||
emacs-version: '27.2' | ||
ext: dylib | ||
target: aarch64-apple-darwin | ||
- os: ubuntu-18.04 | ||
emacs-version: '27.2' | ||
ext: so | ||
host: x86_64-unknown-linux-gnu | ||
- os: windows-2019 | ||
emacs-version: '27.2' | ||
ext: dll | ||
host: x86_64-pc-windows-msvc | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Set up Rust | ||
run: | | ||
rustup install stable | ||
rustc -Vv | ||
cargo -V | ||
- name: Set up Rust's cross-build target | ||
if: matrix.target | ||
run: | | ||
rustup target add ${{ matrix.target }} | ||
- uses: purcell/setup-emacs@v3.0 | ||
- uses: purcell/setup-emacs@b56a75706e31e22d474357c77fb25ce73be2973a | ||
if: runner.os != 'Windows' | ||
with: | ||
version: ${{ matrix.emacs-version }} | ||
|
@@ -56,27 +68,39 @@ jobs: | |
- run: .github/script/setup-cask | ||
|
||
- run: bin/setup | ||
- run: bin/build | ||
- run: bin/build -target "${{ matrix.target }}" | ||
|
||
- run: bin/inspect-binaries | ||
continue-on-error: true | ||
|
||
- name: Install tree-sitter CLI | ||
if: ${{ !matrix.target }} | ||
run: npm install -g [email protected] | ||
- run: bin/test | ||
if: ${{ !matrix.target }} | ||
|
||
- name: Rename cross-build's binary | ||
if: matrix.target | ||
run: | | ||
mv core/tsc-dyn.${{ matrix.ext }} core/tsc-dyn.${{ matrix.target }}.${{ matrix.ext }} | ||
- name: Make a target-explicit copy of native-build's binary | ||
if: ${{ !matrix.target && matrix.host }} | ||
shell: bash | ||
run: | | ||
cp core/tsc-dyn.${{ matrix.ext }} core/tsc-dyn.${{ matrix.host }}.${{ matrix.ext }} | ||
- name: Upload binary | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: tsc-dyn | ||
path: core/tsc-dyn.${{ matrix.ext }} | ||
path: core/tsc-dyn.*${{ matrix.ext }} | ||
if-no-files-found: error | ||
|
||
publish: | ||
needs: build | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: purcell/setup-emacs@v3.0 | ||
- uses: purcell/setup-emacs@b56a75706e31e22d474357c77fb25ce73be2973a | ||
with: | ||
version: '27.2' | ||
- uses: actions/checkout@v2 | ||
|
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
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
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