Skip to content

Commit

Permalink
Merge pull request #6262 from roc-lang/roc_ls_in_nightly
Browse files Browse the repository at this point in the history
include roc lang server in nightly
  • Loading branch information
rtfeldman authored Dec 13, 2023
2 parents 24d042f + c85b97d commit 21408cd
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly_linux_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: ./ci/write_version.sh

- name: build release with lto
run: cargo build --profile=release-with-lto --locked --bin roc
run: cargo build --profile=release-with-lto --locked --bin roc --bin roc_ls

- name: get commit SHA
run: echo "SHA=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_linux_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: ./ci/write_version.sh

- name: build release with lto
run: RUSTFLAGS="-C target-cpu=x86-64" cargo build --profile=release-with-lto --locked --bin roc
run: RUSTFLAGS="-C target-cpu=x86-64" cargo build --profile=release-with-lto --locked --bin roc --bin roc_ls
# target-cpu=x86-64 -> For maximal compatibility for all CPU's. This was also faster in our tests: https://roc.zulipchat.com/#narrow/stream/231635-compiler-development/topic/.2Ecargo.2Fconfig.2Etoml/near/325726299

- name: get commit SHA
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/nightly_macos_apple_silicon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ jobs:
run: ./ci/write_version.sh

- name: build nightly release
run: cargo build --locked --profile=release-with-lto --bin roc

# this makes the roc binary a lot smaller
- name: strip debug info
run: strip ./target/release-with-lto/roc
run: cargo build --locked --profile=release-with-lto --bin roc --bin roc_ls

- name: package release
run: ./ci/package_release.sh ${{ env.RELEASE_FOLDER_NAME }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly_macos_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
# this issue may be caused by using older versions of XCode

- name: build release
run: RUSTFLAGS="-C target-cpu=x86-64" cargo build --profile=release-with-lto --locked --bin roc
run: RUSTFLAGS="-C target-cpu=x86-64" cargo build --profile=release-with-lto --locked --bin roc --bin roc_ls
# target-cpu=x86-64 -> For maximal compatibility for all CPU's.

- name: get commit SHA
Expand Down
4 changes: 1 addition & 3 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ build-nightly-release:
COPY --dir .git LICENSE LEGAL_DETAILS ci ./
# version.txt is used by the CLI: roc --version
RUN ./ci/write_version.sh
RUN RUSTFLAGS=$RUSTFLAGS cargo build --profile=release-with-lto --locked --bin roc
# strip debug info
RUN strip ./target/release-with-lto/roc
RUN RUSTFLAGS=$RUSTFLAGS cargo build --profile=release-with-lto --locked --bin roc --bin roc_ls
RUN ./ci/package_release.sh $RELEASE_FOLDER_NAME
RUN ls
SAVE ARTIFACT ./$RELEASE_FOLDER_NAME.tar.gz AS LOCAL $RELEASE_FOLDER_NAME.tar.gz
12 changes: 9 additions & 3 deletions ci/package_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@
# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
set -euxo pipefail

cp target/release-with-lto/roc ./roc # to be able to delete "target" later
# this makes the binaries a lot smaller
strip ./target/release-with-lto/roc
strip ./target/release-with-lto/roc_ls

# to be able to delete "target" later
cp target/release-with-lto/roc ./roc
cp target/release-with-lto/roc_ls ./roc_lang_server

# delete unnecessary files and folders
git clean -fdx --exclude roc
git clean -fdx --exclude roc --exclude roc_lang_server

mkdir $1


mv roc LICENSE LEGAL_DETAILS $1
mv roc roc_lang_server LICENSE LEGAL_DETAILS $1

mkdir $1/examples
mv examples/helloWorld.roc examples/platform-switching examples/cli $1/examples
Expand Down

0 comments on commit 21408cd

Please sign in to comment.