-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: - downloading rebar3 from https://s3.amazonaws.com/rebar3/rebar3 - ugly `export PATH=...` in Mac actions - after a dozen attempts I were not able to work it with `$GITHUB_PATH` for MacOS workers - adding one more release with OTP 23 on mac - testing: https://github.com/ilya-klyuchnikov/eqwalizer/releases/tag/otp-23-mac Pull Request resolved: #21 Reviewed By: michalmuskala Differential Revision: D43233950 Pulled By: ilya-klyuchnikov fbshipit-source-id: 51586c3746259881a4e075323f9f6749f452ffa9
- Loading branch information
1 parent
65f8d0b
commit e1d0fdc
Showing
2 changed files
with
84 additions
and
13 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 |
---|---|---|
|
@@ -25,7 +25,12 @@ jobs: | |
uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: '25.2' | ||
rebar3-version: '3.20.0' | ||
install-rebar: false | ||
install-hex: false | ||
- name: Install rebar3 | ||
run: "curl https://s3.amazonaws.com/rebar3/rebar3 -o rebar3 && chmod +x rebar3" | ||
- name: "add rebar3 to path" | ||
run: 'echo "$GITHUB_WORKSPACE/rebar3" >> $GITHUB_PATH' | ||
- name: Assemble eqwalizer.jar | ||
run: "cd eqwalizer; sbt assembly" | ||
- name: Assemble eqwalizer binary | ||
|
@@ -90,7 +95,12 @@ jobs: | |
uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: '23.3' | ||
rebar3-version: '3.20.0' | ||
install-rebar: false | ||
install-hex: false | ||
- name: Install rebar3 | ||
run: "curl https://s3.amazonaws.com/rebar3/rebar3 -o rebar3 && chmod +x rebar3" | ||
- name: "add rebar3 to path" | ||
run: 'echo "$GITHUB_WORKSPACE/rebar3" >> $GITHUB_PATH' | ||
- name: Download eqwalizer.jar | ||
uses: "actions/download-artifact@v2" | ||
with: | ||
|
@@ -121,7 +131,7 @@ jobs: | |
asset_name: elp-linux-otp-23.tar.gz | ||
asset_path: elp-linux-otp-23.tar.gz | ||
upload_url: "${{ steps.get_release_url.outputs.upload_url }}" | ||
macos-release: | ||
macos-release-otp-25: | ||
needs: | ||
- linux-release-otp-25 | ||
runs-on: macos-latest | ||
|
@@ -135,8 +145,10 @@ jobs: | |
java: 'java11' | ||
- name: Install Native Image Plugin | ||
run: gu install native-image | ||
- name: Install erlang + rebar3 | ||
run: brew install erlang rebar3 | ||
- name: Install erlang | ||
run: brew install erlang@25 | ||
- name: Install rebar3 | ||
run: "mkdir rebar3 && curl https://s3.amazonaws.com/rebar3/rebar3 -o rebar3/rebar3 && chmod +x rebar3/rebar3" | ||
- name: Set up rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
|
@@ -149,9 +161,9 @@ jobs: | |
- name: Assemble eqwalizer binary | ||
run: "cd eqwalizer && native-image -H:IncludeResources=application.conf --no-server --no-fallback -jar target/scala-2.13/eqwalizer.jar eqwalizer" | ||
- name: Test elp | ||
run: "export ELP_EQWALIZER_PATH=$GITHUB_WORKSPACE/eqwalizer/eqwalizer && cd mini-elp && cargo test --workspace" | ||
run: "export PATH=$GITHUB_WORKSPACE/rebar3:/usr/local/opt/erlang@25/bin:$PATH ELP_EQWALIZER_PATH=$GITHUB_WORKSPACE/eqwalizer/eqwalizer && cd mini-elp && cargo test --workspace" | ||
- name: Assemble elp | ||
run: "export ELP_EQWALIZER_PATH=$GITHUB_WORKSPACE/eqwalizer/eqwalizer && cd mini-elp && cargo build --release" | ||
run: "export PATH=$GITHUB_WORKSPACE/rebar3:/usr/local/opt/erlang@25/bin:$PATH ELP_EQWALIZER_PATH=$GITHUB_WORKSPACE/eqwalizer/eqwalizer && cd mini-elp && cargo build --release" | ||
- name: Make elp-macos.tar.gz | ||
run: 'tar -zcvf elp-macos.tar.gz -C mini-elp/target/release/ elp' | ||
- env: | ||
|
@@ -168,6 +180,55 @@ jobs: | |
asset_name: elp-macos.tar.gz | ||
asset_path: elp-macos.tar.gz | ||
upload_url: "${{ steps.get_release_url.outputs.upload_url }}" | ||
macos-release-otp-23: | ||
needs: | ||
- linux-release-otp-25 | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: "actions/checkout@v2" | ||
- name: Set up GraalVM | ||
uses: "DeLaGuardo/[email protected]" | ||
with: | ||
graalvm: '22.1.0' | ||
java: 'java11' | ||
- name: Install Native Image Plugin | ||
run: gu install native-image | ||
- name: Install erlang | ||
run: brew install erlang@23 | ||
- name: Install rebar3 | ||
run: "mkdir rebar3 && curl https://s3.amazonaws.com/rebar3/rebar3 -o rebar3/rebar3 && chmod +x rebar3/rebar3" | ||
- name: Set up rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: Download eqwalizer.jar | ||
uses: "actions/download-artifact@v2" | ||
with: | ||
name: eqwalizer.jar | ||
path: eqwalizer/target/scala-2.13 | ||
- name: Assemble eqwalizer binary | ||
run: "cd eqwalizer && native-image -H:IncludeResources=application.conf --no-server --no-fallback -jar target/scala-2.13/eqwalizer.jar eqwalizer" | ||
- name: Test elp | ||
run: "export PATH=$GITHUB_WORKSPACE/rebar3:/usr/local/opt/erlang@23/bin:$PATH ELP_EQWALIZER_PATH=$GITHUB_WORKSPACE/eqwalizer/eqwalizer && cd mini-elp && cargo test --workspace" | ||
- name: Assemble elp | ||
run: "export PATH=$GITHUB_WORKSPACE/rebar3:/usr/local/opt/erlang@23/bin:$PATH ELP_EQWALIZER_PATH=$GITHUB_WORKSPACE/eqwalizer/eqwalizer && cd mini-elp && cargo build --release" | ||
- name: Make elp-macos-otp-23.tar.gz | ||
run: 'tar -zcvf elp-macos-otp-23.tar.gz -C mini-elp/target/release/ elp' | ||
- env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
id: get_release_url | ||
name: Get release url | ||
uses: "bruceadams/[email protected]" | ||
- env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
name: Upload release elp-macos-otp-23.tar.gz | ||
uses: "actions/[email protected]" | ||
with: | ||
asset_content_type: application/octet-stream | ||
asset_name: elp-macos-otp-23.tar.gz | ||
asset_path: elp-macos-otp-23.tar.gz | ||
upload_url: "${{ steps.get_release_url.outputs.upload_url }}" | ||
name: eqWAlizer release | ||
on: | ||
release: | ||
|