Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into rename-roc-language…
Browse files Browse the repository at this point in the history
…-server
  • Loading branch information
Anton-4 committed Feb 12, 2024
2 parents 17fabb7 + ec93892 commit 87ff159
Show file tree
Hide file tree
Showing 389 changed files with 15,785 additions and 29,694 deletions.
51 changes: 25 additions & 26 deletions .github/workflows/basic_cli_build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# use .tar.gz for quick testing
ARCHIVE_FORMAT: .tar.br
Expand All @@ -17,7 +17,7 @@ jobs:
prepare:
runs-on: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: roc-lang/basic-cli

Expand All @@ -40,26 +40,26 @@ jobs:
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_apple_silicon-latest.tar.gz

- name: Save roc_nightly archives
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: roc_nightly-*

build-linux-x86_64-files:
runs-on: [ubuntu-20.04]
needs: [prepare]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download the previously uploaded roc_nightly archives
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: build basic-cli with surgical linker and also with legacy linker
env:
CARGO_BUILD_TARGET: x86_64-unknown-linux-musl
run: ./ci/build_basic_cli.sh linux_x86_64 "--linker legacy"

- name: Save .rh, .rm and .o file
uses: actions/upload-artifact@v3
- name: Save .rh, .rm and .o file
uses: actions/upload-artifact@v4
with:
name: linux-x86_64-files
path: |
Expand All @@ -72,10 +72,10 @@ jobs:
runs-on: [self-hosted, Linux, ARM64]
needs: [prepare]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download the previously uploaded roc_nightly archives
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: build basic-cli
env:
Expand All @@ -85,8 +85,8 @@ jobs:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS: "-Clink-self-contained=yes -Clinker=rust-lld"
run: ./ci/build_basic_cli.sh linux_arm64

- name: Save .o file
uses: actions/upload-artifact@v3
- name: Save .o file
uses: actions/upload-artifact@v4
with:
name: linux-arm64-files
path: |
Expand All @@ -96,15 +96,15 @@ jobs:
runs-on: [macos-11] # I expect the generated files to work on macOS 12 and up
needs: [prepare]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download the previously uploaded roc_nightly archives
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- run: ./ci/build_basic_cli.sh macos_x86_64

- name: Save .o files
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: macos-x86_64-files
path: |
Expand All @@ -115,15 +115,15 @@ jobs:
runs-on: [self-hosted, macOS, ARM64]
needs: [prepare]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download the previously uploaded roc_nightly archives
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- run: ./ci/build_basic_cli.sh macos_apple_silicon

- name: Save macos-arm64.o file
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: macos-apple-silicon-files
path: |
Expand All @@ -134,13 +134,13 @@ jobs:
name: create release archive
runs-on: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: remove all folders except the ci folder
run: ls | grep -v ci | xargs rm -rf

- name: Download the previously uploaded files
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: mv roc nightly and simplify name
run: mv $(ls -d artifact/* | grep "roc_nightly.*tar\.gz" | grep "linux_x86_64") ./roc_nightly.tar.gz
Expand All @@ -157,7 +157,7 @@ jobs:
- run: git clone https://github.com/roc-lang/basic-cli.git

- run: cp macos-apple-silicon-files/* ./basic-cli/platform

- run: cp linux-x86_64-files/* ./basic-cli/platform

- run: cp linux-arm64-files/* ./basic-cli/platform
Expand All @@ -177,14 +177,14 @@ jobs:
- run: echo "TAR_FILENAME=$(ls -d basic-cli/platform/* | grep ${{ env.ARCHIVE_FORMAT }})" >> $GITHUB_ENV

- name: Upload platform archive
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: basic-cli-platform
path: |
${{ env.TAR_FILENAME }}
- name: Upload docs archive
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: release-assets-docs
path: |
Expand All @@ -196,7 +196,7 @@ jobs:
steps:

- name: Download the previously uploaded files
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: mv roc nightly and simplify name
run: mv $(ls -d artifact/* | grep "roc_nightly.*tar\.gz" | grep "linux_x86_64") ./roc_nightly.tar.gz
Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
mkdir platform
# move all files to platform dir
find . -maxdepth 1 -type f -exec mv {} platform/ \;
mkdir temp-basic-cli
cd temp-basic-cli
git clone https://github.com/roc-lang/basic-cli.git
Expand All @@ -242,9 +242,8 @@ jobs:
cp -r ci ../..
cp -r LICENSE ../..
# LICENSE is necessary for command test
- name: run tests
run: |
cd basic-cli-platform
ROC=./roc_nightly/roc EXAMPLES_DIR=./examples/ ROC_BUILD_FLAGS=--prebuilt-platform ./ci/all_tests.sh
8 changes: 4 additions & 4 deletions .github/workflows/basic_cli_test_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
runs-on: [self-hosted, Linux, ARM64]
steps:
- name: clone basic-cli repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: roc-lang/basic-cli
ref: main

- name: get latest roc nightly
run: |
curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_arm64-latest.tar.gz
- name: rename nightly tar
run: mv $(ls | grep "roc_nightly.*tar\.gz") roc_nightly.tar.gz

Expand All @@ -35,7 +35,7 @@ jobs:

- run: expect -v

# Run all tests
# Run all tests
- run: ROC=./roc_nightly/roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh

######
Expand All @@ -44,7 +44,7 @@ jobs:

- name: Remove roc_nightly folder to keep things simple (we'll download it again later)
run: rm -rf roc_nightly

- name: Get the repo of the latest basic-cli release
run: |
git clone --depth 1 https://github.com/roc-lang/basic-cli
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/basic_webserver_build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# use .tar.gz for quick testing
ARCHIVE_FORMAT: .tar.br
Expand All @@ -16,34 +16,34 @@ jobs:
fetch-releases:
runs-on: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-latest.tar.gz
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_arm64-latest.tar.gz
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_x86_64-latest.tar.gz
- run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_apple_silicon-latest.tar.gz

- name: Save roc_nightly archives
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: roc_nightly-*

build-linux-x86_64-files:
runs-on: [ubuntu-20.04]
needs: [fetch-releases]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download the previously uploaded roc_nightly archives
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: build basic-webserver with legacy linker
env:
CARGO_BUILD_TARGET: x86_64-unknown-linux-musl
run: ./ci/build_basic_webserver.sh linux_x86_64 "--linker legacy"

- name: Save .rh, .rm and .o file
uses: actions/upload-artifact@v3
- name: Save .rh, .rm and .o file
uses: actions/upload-artifact@v4
with:
name: linux-x86_64-files
path: |
Expand All @@ -56,10 +56,10 @@ jobs:
runs-on: [self-hosted, Linux, ARM64]
needs: [fetch-releases]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download the previously uploaded roc_nightly archives
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: build basic-webserver
env:
Expand All @@ -69,8 +69,8 @@ jobs:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS: "-Clink-self-contained=yes -Clinker=rust-lld"
run: ./ci/build_basic_webserver.sh linux_arm64

- name: Save .o file
uses: actions/upload-artifact@v3
- name: Save .o file
uses: actions/upload-artifact@v4
with:
name: linux-arm64-files
path: |
Expand All @@ -80,15 +80,15 @@ jobs:
runs-on: [macos-11] # I expect the generated files to work on macOS 12 and 13
needs: [fetch-releases]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download the previously uploaded roc_nightly archives
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- run: ./ci/build_basic_webserver.sh macos_x86_64

- name: Save .o files
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: macos-x86_64-files
path: |
Expand All @@ -99,15 +99,15 @@ jobs:
runs-on: [self-hosted, macOS, ARM64]
needs: [fetch-releases]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download the previously uploaded roc_nightly archives
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- run: ./ci/build_basic_webserver.sh macos_apple_silicon

- name: Save macos-arm64.o file
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: macos-apple-silicon-files
path: |
Expand All @@ -118,13 +118,13 @@ jobs:
name: create release archive
runs-on: [ubuntu-20.04]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: remove all folders except the ci folder
run: ls | grep -v ci | xargs rm -rf

- name: Download the previously uploaded files
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: mv roc nightly and simplify name
run: mv $(ls -d artifact/* | grep "roc_nightly.*tar\.gz" | grep "linux_x86_64") ./roc_nightly.tar.gz
Expand All @@ -145,7 +145,7 @@ jobs:
cd ..
- run: cp macos-apple-silicon-files/* ./basic-webserver/platform

- run: cp linux-x86_64-files/* ./basic-webserver/platform

- run: cp linux-arm64-files/* ./basic-webserver/platform
Expand All @@ -157,7 +157,7 @@ jobs:
- run: echo "TAR_FILENAME=$(ls -d basic-webserver/platform/* | grep ${{ env.ARCHIVE_FORMAT }})" >> $GITHUB_ENV

- name: Upload platform archive
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: basic-webserver-platform
path: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:
env:
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: "main"
clean: "true"

- name: on main; prepare a self-contained benchmark folder
run: nix develop -c ./ci/benchmarks/prep_folder.sh main

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
clean: "false" # we want to keep the benchmark folder

Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ci_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
run_tests: ${{ steps.filecheck.outputs.run_tests }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Check if only css, html or md files changed
id: filecheck
Expand Down Expand Up @@ -112,7 +112,3 @@ jobs:
fi
- run: echo "Workflow succeeded :)"




Loading

0 comments on commit 87ff159

Please sign in to comment.