From 8b6bb9d75df72ea83e758eb9c38a2ec989f998c9 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Fri, 11 Aug 2023 20:21:53 +0200 Subject: [PATCH 01/27] prep basic-cli 0.5 release --- .github/workflows/basic_cli_build_release.yml | 25 ++++++++++++++++++- .github/workflows/benchmarks.yml | 2 +- .github/workflows/macos_x86_64.yml | 2 +- .github/workflows/markdown_link_check.yml | 2 +- .github/workflows/nix_linux_x86_64.yml | 2 +- .github/workflows/nix_macos_apple_silicon.yml | 2 +- .github/workflows/nix_macos_x86_64.yml | 2 +- .github/workflows/spellcheck.yml | 2 +- .github/workflows/ubuntu_x86_64.yml | 2 +- .github/workflows/windows_release_build.yml | 2 +- .github/workflows/windows_tests.yml | 2 +- ci/build_basic_cli.sh | 11 ++++++-- 12 files changed, 43 insertions(+), 13 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 01c92664548..ff4989eec76 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: workflow_dispatch: # this cancels workflows currently in progress if you start a new one @@ -18,6 +18,7 @@ jobs: - uses: actions/checkout@v3 - 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 @@ -49,6 +50,28 @@ jobs: basic-cli/src/linux-x86_64.rh basic-cli/src/linux-x86_64.o + + build-linux-arm64-files: + runs-on: [self-hosted, Linux, ARM64] + needs: [fetch-releases] + steps: + - uses: actions/checkout@v3 + + - name: Download the previously uploaded roc_nightly archives + uses: actions/download-artifact@v3 + + - name: build basic-cli with surgical linker and also with legacy linker + env: + CARGO_BUILD_TARGET: aarch64-unknown-linux-gnu + run: ./ci/build_basic_cli.sh linux_arm64 + + - name: Save .o file + uses: actions/upload-artifact@v3 + with: + name: linux-arm64-files + path: | + basic-cli/src/linux-arm64.o + build-macos-x86_64-files: runs-on: [macos-11] # I expect the generated files to work on macOS 12 needs: [fetch-releases] diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 4d016a3e3cd..b682c6b1f96 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -1,5 +1,5 @@ on: - pull_request: + #pull_request: name: Benchmarks diff --git a/.github/workflows/macos_x86_64.yml b/.github/workflows/macos_x86_64.yml index fc3527fa292..2598a9783e9 100644 --- a/.github/workflows/macos_x86_64.yml +++ b/.github/workflows/macos_x86_64.yml @@ -1,5 +1,5 @@ on: - pull_request: + #pull_request: name: Macos x86-64 rust tests diff --git a/.github/workflows/markdown_link_check.yml b/.github/workflows/markdown_link_check.yml index 1b60da4f8c7..42fa2e9099f 100644 --- a/.github/workflows/markdown_link_check.yml +++ b/.github/workflows/markdown_link_check.yml @@ -1,5 +1,5 @@ on: - pull_request: + #pull_request: schedule: - cron: '0 9 * * *' # 9=9am utc+0 diff --git a/.github/workflows/nix_linux_x86_64.yml b/.github/workflows/nix_linux_x86_64.yml index 647adf6fa57..c86e12af5c8 100644 --- a/.github/workflows/nix_linux_x86_64.yml +++ b/.github/workflows/nix_linux_x86_64.yml @@ -1,5 +1,5 @@ on: - pull_request: + #pull_request: name: Nix linux x86_64 cargo test diff --git a/.github/workflows/nix_macos_apple_silicon.yml b/.github/workflows/nix_macos_apple_silicon.yml index 0f00277d2cd..09fe8922bf3 100644 --- a/.github/workflows/nix_macos_apple_silicon.yml +++ b/.github/workflows/nix_macos_apple_silicon.yml @@ -1,5 +1,5 @@ on: - pull_request: + #pull_request: name: Nix apple silicon cargo test diff --git a/.github/workflows/nix_macos_x86_64.yml b/.github/workflows/nix_macos_x86_64.yml index 7c9e43aa281..b5aa5fed379 100644 --- a/.github/workflows/nix_macos_x86_64.yml +++ b/.github/workflows/nix_macos_x86_64.yml @@ -1,5 +1,5 @@ on: - pull_request: + #pull_request: name: Nix macOS x86_64 cargo test diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index fb7f9284c0c..bbdf5ee4e3a 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -1,5 +1,5 @@ on: - pull_request: + #pull_request: name: SpellCheck diff --git a/.github/workflows/ubuntu_x86_64.yml b/.github/workflows/ubuntu_x86_64.yml index a411f73d120..709428b06dc 100644 --- a/.github/workflows/ubuntu_x86_64.yml +++ b/.github/workflows/ubuntu_x86_64.yml @@ -1,5 +1,5 @@ on: - pull_request: + #pull_request: name: CI diff --git a/.github/workflows/windows_release_build.yml b/.github/workflows/windows_release_build.yml index fee39a873ab..b47e2930346 100644 --- a/.github/workflows/windows_release_build.yml +++ b/.github/workflows/windows_release_build.yml @@ -1,5 +1,5 @@ on: - pull_request: + #pull_request: name: windows - release build diff --git a/.github/workflows/windows_tests.yml b/.github/workflows/windows_tests.yml index 82920c2a5f9..9bd857dad3e 100644 --- a/.github/workflows/windows_tests.yml +++ b/.github/workflows/windows_tests.yml @@ -1,5 +1,5 @@ on: - pull_request: + #pull_request: name: windows - subset of tests diff --git a/ci/build_basic_cli.sh b/ci/build_basic_cli.sh index 1a74dce3c71..ce34353adf9 100755 --- a/ci/build_basic_cli.sh +++ b/ci/build_basic_cli.sh @@ -4,11 +4,18 @@ set -euxo pipefail git clone https://github.com/roc-lang/basic-cli.git +cd basic-cli +git checkout new-abilities-syntax +cd .. -if [ "$(uname -m)" == "x86_64" ] && [ "$(uname -s)" == "Linux" ]; then +if [ "$(uname -s)" == "Linux" ]; then sudo apt-get install musl-tools cd basic-cli/src # we cd to install the target for the right rust version - rustup target add x86_64-unknown-linux-musl + if [ "$(uname -m)" == "x86_64" ]; then + rustup target add x86_64-unknown-linux-musl + elif [ "$(uname -m)" == "aarch64" ]; then + rustup target add aarch64-unknown-linux-gnu + fi cd ../.. fi From e2661585ef9dceb416f3556bcf79d30316732b8d Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sat, 12 Aug 2023 10:06:47 +0200 Subject: [PATCH 02/27] arm64 fixes --- .github/workflows/basic_cli_build_release.yml | 4 +++- ci/build_basic_cli.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index ff4989eec76..5414493c6f5 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -110,7 +110,7 @@ jobs: basic-cli/src/macos-arm64.o create-release-archive: - needs: [build-linux-x86_64-files, build-macos-x86_64-files, build-macos-apple-silicon-files] + needs: [build-linux-x86_64-files, build-linux-arm64-files, build-macos-x86_64-files, build-macos-apple-silicon-files] name: create release archive runs-on: [ubuntu-20.04] steps: @@ -140,6 +140,8 @@ jobs: - run: cp linux-x86_64-files/* ./basic-cli/src + - run: cp linux-arm64-files/* ./basic-cli/src + - run: cp macos-x86_64-files/* ./basic-cli/src - run: ./roc_nightly/roc build --bundle=${{ env.ARCHIVE_FORMAT }} ./basic-cli/src/main.roc diff --git a/ci/build_basic_cli.sh b/ci/build_basic_cli.sh index ce34353adf9..5afe6148626 100755 --- a/ci/build_basic_cli.sh +++ b/ci/build_basic_cli.sh @@ -9,7 +9,7 @@ git checkout new-abilities-syntax cd .. if [ "$(uname -s)" == "Linux" ]; then - sudo apt-get install musl-tools + sudo apt-get install -y musl-tools cd basic-cli/src # we cd to install the target for the right rust version if [ "$(uname -m)" == "x86_64" ]; then rustup target add x86_64-unknown-linux-musl From a9b97768b469b00ce5e78e4f3a5ae55e72306fa5 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sat, 12 Aug 2023 12:01:48 +0200 Subject: [PATCH 03/27] specify linux_x86_64 Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/basic_cli_build_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 5414493c6f5..020fb52638c 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -123,7 +123,7 @@ jobs: uses: actions/download-artifact@v3 - name: mv roc nightly and simplify name - run: mv $(ls -d artifact/* | grep "roc_nightly.*tar\.gz" | grep "linux") ./roc_nightly.tar.gz + run: mv $(ls -d artifact/* | grep "roc_nightly.*tar\.gz" | grep "linux_x86_64") ./roc_nightly.tar.gz - name: decompress the tar run: tar -xzvf roc_nightly.tar.gz @@ -164,7 +164,7 @@ jobs: uses: actions/download-artifact@v3 - name: mv roc nightly and simplify name - run: mv $(ls -d artifact/* | grep "roc_nightly.*tar\.gz" | grep "linux") ./roc_nightly.tar.gz + run: mv $(ls -d artifact/* | grep "roc_nightly.*tar\.gz" | grep "linux_x86_64") ./roc_nightly.tar.gz - name: decompress the tar run: tar -xzvf roc_nightly.tar.gz From d5eca4af9814b6e6165fafb04a975329cce95403 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sat, 12 Aug 2023 13:53:15 +0200 Subject: [PATCH 04/27] x86_64 > x64 Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/basic_cli_build_release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 020fb52638c..8d2367ae0cd 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -46,9 +46,9 @@ jobs: with: name: linux-x86_64-files path: | - basic-cli/src/metadata_linux-x86_64.rm - basic-cli/src/linux-x86_64.rh - basic-cli/src/linux-x86_64.o + basic-cli/src/metadata_linux-x64.rm + basic-cli/src/linux-x64.rh + basic-cli/src/linux-x64.o build-linux-arm64-files: @@ -88,7 +88,7 @@ jobs: with: name: macos-x86_64-files path: | - basic-cli/src/macos-x86_64.o + basic-cli/src/macos-x64.o build-macos-apple-silicon-files: name: build apple silicon .o file From 628f41ab78e88ce697abbe057784f7031827caab Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sat, 12 Aug 2023 14:55:03 +0200 Subject: [PATCH 05/27] build before final test Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/basic_cli_build_release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 8d2367ae0cd..1a4383e7952 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -192,6 +192,7 @@ jobs: cd examples curl -fOL https://raw.githubusercontent.com/roc-lang/basic-cli/main/examples/http-get.roc sed -i 's/pf:\ \"[^"]*/pf:\ \"\.\.\/main.roc/g' http-get.roc + ./roc_nightly/roc build http-get.roc cd .. curl -fOL https://raw.githubusercontent.com/roc-lang/basic-cli/main/ci/expect_scripts/http-get.exp From 08f7865c97c84a33dbdac40c5b980068a3a0372d Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sat, 12 Aug 2023 16:39:49 +0200 Subject: [PATCH 06/27] fix path, back to main branch --- .github/workflows/basic_cli_build_release.yml | 3 ++- ci/build_basic_cli.sh | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 1a4383e7952..038133ca54d 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -192,8 +192,9 @@ jobs: cd examples curl -fOL https://raw.githubusercontent.com/roc-lang/basic-cli/main/examples/http-get.roc sed -i 's/pf:\ \"[^"]*/pf:\ \"\.\.\/main.roc/g' http-get.roc - ./roc_nightly/roc build http-get.roc + cd .. + ./roc_nightly/roc build examples/http-get.roc curl -fOL https://raw.githubusercontent.com/roc-lang/basic-cli/main/ci/expect_scripts/http-get.exp - run: sudo apt install -y expect diff --git a/ci/build_basic_cli.sh b/ci/build_basic_cli.sh index 5afe6148626..a3d02ab213d 100755 --- a/ci/build_basic_cli.sh +++ b/ci/build_basic_cli.sh @@ -4,9 +4,6 @@ set -euxo pipefail git clone https://github.com/roc-lang/basic-cli.git -cd basic-cli -git checkout new-abilities-syntax -cd .. if [ "$(uname -s)" == "Linux" ]; then sudo apt-get install -y musl-tools From 4b53557c7074504b7340002137b37e06165c3e70 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Fri, 18 Aug 2023 19:44:04 +0200 Subject: [PATCH 07/27] added debug upload --- .github/workflows/basic_cli_build_release.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 038133ca54d..b862162249a 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -9,7 +9,7 @@ concurrency: # use .tar.gz for quick testing env: - ARCHIVE_FORMAT: .tar.br + ARCHIVE_FORMAT: .tar.gz jobs: fetch-releases: @@ -194,8 +194,17 @@ jobs: sed -i 's/pf:\ \"[^"]*/pf:\ \"\.\.\/main.roc/g' http-get.roc cd .. - ./roc_nightly/roc build examples/http-get.roc - curl -fOL https://raw.githubusercontent.com/roc-lang/basic-cli/main/ci/expect_scripts/http-get.exp + + #./roc_nightly/roc build examples/http-get.roc + #curl -fOL https://raw.githubusercontent.com/roc-lang/basic-cli/main/ci/expect_scripts/http-get.exp + + # temp for debugging + - name: Save basic-cli-platform + uses: actions/upload-artifact@v3 + with: + name: basic-cli-platform-debug + path: | + basic-cli-platform - run: sudo apt install -y expect From e11725b1e28417c66d27b060d3b68e1b3f042c41 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Mon, 21 Aug 2023 17:19:58 +0200 Subject: [PATCH 08/27] add prebuilt-platform flag Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/basic_cli_build_release.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index b862162249a..02af002e8b5 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -195,16 +195,8 @@ jobs: cd .. - #./roc_nightly/roc build examples/http-get.roc - #curl -fOL https://raw.githubusercontent.com/roc-lang/basic-cli/main/ci/expect_scripts/http-get.exp - - # temp for debugging - - name: Save basic-cli-platform - uses: actions/upload-artifact@v3 - with: - name: basic-cli-platform-debug - path: | - basic-cli-platform + ./roc_nightly/roc build examples/http-get.roc --prebuilt-platform + curl -fOL https://raw.githubusercontent.com/roc-lang/basic-cli/main/ci/expect_scripts/http-get.exp - run: sudo apt install -y expect From 6650f62b72ccec1bec39cf9d3e0e7ae542bed9e8 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 22 Aug 2023 14:39:56 +0200 Subject: [PATCH 09/27] try with musl --- .github/workflows/basic_cli_build_release.yml | 6 +++--- ci/build_basic_cli.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 02af002e8b5..9af7dface51 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -60,9 +60,9 @@ jobs: - name: Download the previously uploaded roc_nightly archives uses: actions/download-artifact@v3 - - name: build basic-cli with surgical linker and also with legacy linker + - name: build basic-cli env: - CARGO_BUILD_TARGET: aarch64-unknown-linux-gnu + CARGO_BUILD_TARGET: aarch64-unknown-linux-musl run: ./ci/build_basic_cli.sh linux_arm64 - name: Save .o file @@ -73,7 +73,7 @@ jobs: basic-cli/src/linux-arm64.o build-macos-x86_64-files: - runs-on: [macos-11] # I expect the generated files to work on macOS 12 + runs-on: [macos-11] # I expect the generated files to work on macOS 12 and 13 needs: [fetch-releases] steps: - uses: actions/checkout@v3 diff --git a/ci/build_basic_cli.sh b/ci/build_basic_cli.sh index a3d02ab213d..1019d55660a 100755 --- a/ci/build_basic_cli.sh +++ b/ci/build_basic_cli.sh @@ -11,7 +11,7 @@ if [ "$(uname -s)" == "Linux" ]; then if [ "$(uname -m)" == "x86_64" ]; then rustup target add x86_64-unknown-linux-musl elif [ "$(uname -m)" == "aarch64" ]; then - rustup target add aarch64-unknown-linux-gnu + rustup target add aarch64-unknown-linux-musl fi cd ../.. fi From d9914bb34abb6c4c6debfc58e27a06dddd107763 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Mon, 13 Nov 2023 16:47:14 +0100 Subject: [PATCH 10/27] temp disable other workflows --- .github/workflows/devtools_test_linux_x86_64.yml | 2 +- .github/workflows/devtools_test_macos_apple_silicon.yml | 2 +- .github/workflows/nix_linux_arm64_cargo.yml | 2 +- .github/workflows/nix_linux_arm64_default.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/devtools_test_linux_x86_64.yml b/.github/workflows/devtools_test_linux_x86_64.yml index 6c8d8b1e1c3..b6d332c5ac4 100644 --- a/.github/workflows/devtools_test_linux_x86_64.yml +++ b/.github/workflows/devtools_test_linux_x86_64.yml @@ -1,5 +1,5 @@ on: - pull_request: +# pull_request: name: devtools nix files test - linux diff --git a/.github/workflows/devtools_test_macos_apple_silicon.yml b/.github/workflows/devtools_test_macos_apple_silicon.yml index 68027ecb00f..45ce2e94c97 100644 --- a/.github/workflows/devtools_test_macos_apple_silicon.yml +++ b/.github/workflows/devtools_test_macos_apple_silicon.yml @@ -1,5 +1,5 @@ on: - pull_request: +# pull_request: name: devtools nix files test - macos diff --git a/.github/workflows/nix_linux_arm64_cargo.yml b/.github/workflows/nix_linux_arm64_cargo.yml index 52dfde0a2ee..dc516db9133 100644 --- a/.github/workflows/nix_linux_arm64_cargo.yml +++ b/.github/workflows/nix_linux_arm64_cargo.yml @@ -1,5 +1,5 @@ on: - pull_request: +# pull_request: name: test cargo build on linux arm64 inside nix diff --git a/.github/workflows/nix_linux_arm64_default.yml b/.github/workflows/nix_linux_arm64_default.yml index be06485367f..73ce60c4cfe 100644 --- a/.github/workflows/nix_linux_arm64_default.yml +++ b/.github/workflows/nix_linux_arm64_default.yml @@ -1,5 +1,5 @@ on: - pull_request: +# pull_request: name: test default.nix on linux arm64 From 3ada01dafdd9a9cdf449daeee1b79968e8094d7a Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 14 Nov 2023 11:10:31 +0100 Subject: [PATCH 11/27] sudo musl-tools fix --- ci/build_basic_cli.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/build_basic_cli.sh b/ci/build_basic_cli.sh index 1019d55660a..832f6d316f7 100755 --- a/ci/build_basic_cli.sh +++ b/ci/build_basic_cli.sh @@ -6,7 +6,13 @@ set -euxo pipefail git clone https://github.com/roc-lang/basic-cli.git if [ "$(uname -s)" == "Linux" ]; then - sudo apt-get install -y musl-tools + + # check if musl-tools is installed + if ! dpkg -l | grep -q musl-tools; then + # install musl-tools with timeout for sudo problems with CI + timeout 300s sudo apt-get install -y musl-tools + fi + cd basic-cli/src # we cd to install the target for the right rust version if [ "$(uname -m)" == "x86_64" ]; then rustup target add x86_64-unknown-linux-musl From ad4b9293aa4264fce65b130e6dacea5b9f906d90 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Wed, 15 Nov 2023 14:21:34 +0100 Subject: [PATCH 12/27] added flags required for ring (musl) See https://github.com/briansmith/ring/blob/445de2fb9c611d0307e57791bad8205290e3919c/mk/cargo.sh#L70 Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/basic_cli_build_release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 9af7dface51..df4d6a4f805 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -63,6 +63,9 @@ jobs: - name: build basic-cli env: CARGO_BUILD_TARGET: aarch64-unknown-linux-musl + CC_aarch64_unknown_linux_musl: clang-16 + AR_aarch64_unknown_linux_musl: llvm-ar-16 + 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 From e5c584b9aa40e214385543aedd151aa3638d9b6a Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Wed, 15 Nov 2023 16:25:01 +0100 Subject: [PATCH 13/27] test with all examples Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/basic_cli_build_release.yml | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index df4d6a4f805..e73913707ab 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -7,9 +7,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -# use .tar.gz for quick testing env: + # use .tar.gz for quick testing ARCHIVE_FORMAT: .tar.gz + BASIC_CLI_BRANCH: main jobs: fetch-releases: @@ -187,24 +188,24 @@ jobs: cd basic-cli-platform && ls | grep "tar" | xargs brotli -d ls | grep "tar$" | xargs tar -xf - - name: prep testing http-get.roc + - name: Install expect for tests if we dont have it yet + run: if ! dpkg -l | grep -qw expect; then sudo apt install -y expect + + - name: prep testing run: | mv roc_nightly basic-cli-platform/. cd basic-cli-platform - mkdir examples - cd examples - curl -fOL https://raw.githubusercontent.com/roc-lang/basic-cli/main/examples/http-get.roc - sed -i 's/pf:\ \"[^"]*/pf:\ \"\.\.\/main.roc/g' http-get.roc + mkdir src + find . -maxdepth 1 -type f -exec mv {} src/ \; + + mkdir temp-basic-cli + cd temp-basic-cli + git clone https://github.com/roc-lang/basic-cli.git + git checkout ${{ env.BASIC_CLI_BRANCH }} + cp -r examples .. + cp -r ci .. cd .. - ./roc_nightly/roc build examples/http-get.roc --prebuilt-platform - curl -fOL https://raw.githubusercontent.com/roc-lang/basic-cli/main/ci/expect_scripts/http-get.exp - - - run: sudo apt install -y expect - - - name: execute test - run: | - cd basic-cli-platform - expect http-get.exp + ROC=./roc_nightly/roc EXAMPLES_DIR=./examples ./ci/all_tests.sh From e6bf12f0b858c481ca7ac0dcd32d8d9012ff4ee3 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Wed, 15 Nov 2023 18:59:29 +0100 Subject: [PATCH 14/27] fix if Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/basic_cli_build_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index e73913707ab..c0f5fa149f5 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -189,7 +189,7 @@ jobs: ls | grep "tar$" | xargs tar -xf - name: Install expect for tests if we dont have it yet - run: if ! dpkg -l | grep -qw expect; then sudo apt install -y expect + run: if ! dpkg -l | grep -qw expect; then sudo apt install -y expect; fi - name: prep testing run: | From 51c7ba2def8692e3804d5734303127a71c871c55 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Wed, 15 Nov 2023 19:38:21 +0100 Subject: [PATCH 15/27] fix path issue Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/basic_cli_build_release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index c0f5fa149f5..59d3816fa96 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -201,11 +201,12 @@ jobs: mkdir temp-basic-cli cd temp-basic-cli git clone https://github.com/roc-lang/basic-cli.git + cd basic-cli git checkout ${{ env.BASIC_CLI_BRANCH }} - cp -r examples .. - cp -r ci .. + cp -r examples ../.. + cp -r ci ../.. - cd .. + cd ../.. ROC=./roc_nightly/roc EXAMPLES_DIR=./examples ./ci/all_tests.sh From dc8d7098f16a78fefe4e51b47c1115c9e366e611 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Wed, 15 Nov 2023 20:01:09 +0100 Subject: [PATCH 16/27] fix examples path Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/basic_cli_build_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 59d3816fa96..d87ad49a377 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -208,5 +208,5 @@ jobs: cd ../.. - ROC=./roc_nightly/roc EXAMPLES_DIR=./examples ./ci/all_tests.sh + ROC=./roc_nightly/roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh From cb488eab4e582ebb89758d08d2b8db02797b7eea Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Fri, 17 Nov 2023 15:15:30 +0100 Subject: [PATCH 17/27] use prebuilt-platform flag Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/basic_cli_build_release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index d87ad49a377..d35231d183d 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -206,7 +206,8 @@ jobs: cp -r examples ../.. cp -r ci ../.. - cd ../.. - - ROC=./roc_nightly/roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh + - name: run tests + run: | + cd basic-cli-platform + ROC=./roc_nightly/roc EXAMPLES_DIR=./examples/ ROC_BUILD_FLAGS=--prebuilt-platform ./ci/all_tests.sh From abd622b5a62f223dec14740d5810134263eb7fb2 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Fri, 17 Nov 2023 16:39:49 +0100 Subject: [PATCH 18/27] Update basic_cli_build_release.yml Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/basic_cli_build_release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index d35231d183d..ef755f408ed 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -205,6 +205,8 @@ jobs: git checkout ${{ env.BASIC_CLI_BRANCH }} cp -r examples ../.. cp -r ci ../.. + cp -r LICENSE ../.. + # LICENSE is necessary for command test - name: run tests run: | From badc45d442fe50dc7ec1f8609b12a82678cd9891 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Fri, 17 Nov 2023 20:02:14 +0100 Subject: [PATCH 19/27] ci install ncat(nmap) Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/basic_cli_build_release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index ef755f408ed..631e0c8cdb3 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -191,6 +191,9 @@ jobs: - name: Install expect for tests if we dont have it yet run: if ! dpkg -l | grep -qw expect; then sudo apt install -y expect; fi + - name: Install ncat (included with nmap) for tests if we dont have it yet + run: if ! dpkg -l | grep -qw nmap; then sudo apt install -y nmap; fi + - name: prep testing run: | mv roc_nightly basic-cli-platform/. From 04b620b9f449ccbd730087ebfe97d2ecc5f012c8 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Fri, 17 Nov 2023 20:49:50 +0100 Subject: [PATCH 20/27] apparently nmap does not contain ncat Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/basic_cli_build_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 631e0c8cdb3..246b29222d9 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -191,8 +191,8 @@ jobs: - name: Install expect for tests if we dont have it yet run: if ! dpkg -l | grep -qw expect; then sudo apt install -y expect; fi - - name: Install ncat (included with nmap) for tests if we dont have it yet - run: if ! dpkg -l | grep -qw nmap; then sudo apt install -y nmap; fi + - name: Install ncat for tests if we dont have it yet + run: if ! dpkg -l | grep -qw ncat; then sudo apt install -y ncat; fi - name: prep testing run: | From 9217494570c22e3f933650d94ea084023e01960e Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sun, 19 Nov 2023 13:30:56 +0100 Subject: [PATCH 21/27] set up basic_webserver build --- .github/workflows/basic_cli_build_release.yml | 2 +- .../basic_webserver_build_release.yml | 164 ++++++++++++++++++ ci/build_basic_webserver.sh | 52 ++++++ 3 files changed, 217 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/basic_webserver_build_release.yml create mode 100644 ci/build_basic_webserver.sh diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 246b29222d9..b08b97674ed 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -1,5 +1,5 @@ on: - pull_request: +# pull_request: workflow_dispatch: # this cancels workflows currently in progress if you start a new one diff --git a/.github/workflows/basic_webserver_build_release.yml b/.github/workflows/basic_webserver_build_release.yml new file mode 100644 index 00000000000..41db268377c --- /dev/null +++ b/.github/workflows/basic_webserver_build_release.yml @@ -0,0 +1,164 @@ +on: + pull_request: + workflow_dispatch: + +# this cancels workflows currently in progress if you start a new one +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + # use .tar.gz for quick testing + ARCHIVE_FORMAT: .tar.gz + BASIC_WEBSERVER_BRANCH: more-features + +jobs: + fetch-releases: + runs-on: [ubuntu-20.04] + steps: + - uses: actions/checkout@v3 + + - 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 + with: + path: roc_nightly-* + + build-linux-x86_64-files: + runs-on: [ubuntu-20.04] + needs: [fetch-releases] + steps: + - uses: actions/checkout@v3 + + - name: Download the previously uploaded roc_nightly archives + uses: actions/download-artifact@v3 + + - name: build basic-webserver with surgical linker and also 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 + with: + name: linux-x86_64-files + path: | + basic-webserver/platform/metadata_linux-x64.rm + basic-webserver/platform/linux-x64.rh + basic-webserver/platform/linux-x64.o + + + build-linux-arm64-files: + runs-on: [self-hosted, Linux, ARM64] + needs: [fetch-releases] + steps: + - uses: actions/checkout@v3 + + - name: Download the previously uploaded roc_nightly archives + uses: actions/download-artifact@v3 + + - name: build basic-webserver + env: + CARGO_BUILD_TARGET: aarch64-unknown-linux-musl + CC_aarch64_unknown_linux_musl: clang-16 + AR_aarch64_unknown_linux_musl: llvm-ar-16 + 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 + with: + name: linux-arm64-files + path: | + basic-webserver/platform/linux-arm64.o + + build-macos-x86_64-files: + runs-on: [macos-11] # I expect the generated files to work on macOS 12 and 13 + needs: [fetch-releases] + steps: + - uses: actions/checkout@v3 + + - name: Download the previously uploaded roc_nightly archives + uses: actions/download-artifact@v3 + + - run: ./ci/build_basic_webserver.sh macos_x86_64 + + - name: Save .o files + uses: actions/upload-artifact@v3 + with: + name: macos-x86_64-files + path: | + basic-webserver/platform/macos-x64.o + + build-macos-apple-silicon-files: + name: build apple silicon .o file + runs-on: [self-hosted, macOS, ARM64] + needs: [fetch-releases] + steps: + - uses: actions/checkout@v3 + + - name: Download the previously uploaded roc_nightly archives + uses: actions/download-artifact@v3 + + - run: ./ci/build_basic_webserver.sh macos_apple_silicon + + - name: Save macos-arm64.o file + uses: actions/upload-artifact@v3 + with: + name: macos-apple-silicon-files + path: | + basic-webserver/platform/macos-arm64.o + + create-release-archive: + needs: [build-linux-x86_64-files, build-linux-arm64-files, build-macos-x86_64-files, build-macos-apple-silicon-files] + name: create release archive + runs-on: [ubuntu-20.04] + steps: + - uses: actions/checkout@v3 + + - 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 + + - 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 + + - name: decompress the tar + run: tar -xzvf roc_nightly.tar.gz + + - name: delete tar + run: rm roc_nightly.tar.gz + + - name: rename nightly folder + run: mv roc_nightly* roc_nightly + + - run: | + git clone https://github.com/roc-lang/basic-webserver.git + cd basic-webserver + git checkout ${{ env.BASIC_WEBSERVER_BRANCH }} + 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 + + - run: cp macos-x86_64-files/* ./basic-webserver/platform + + - run: ./roc_nightly/roc build --bundle=${{ env.ARCHIVE_FORMAT }} ./basic-webserver/platform/main.roc + + - run: echo "TAR_FILENAME=$(ls -d basic-webserver/platform/* | grep ${{ env.ARCHIVE_FORMAT }})" >> $GITHUB_ENV + + - name: Upload platform archive + uses: actions/upload-artifact@v3 + with: + name: basic-webserver-platform + path: | + ${{ env.TAR_FILENAME }} diff --git a/ci/build_basic_webserver.sh b/ci/build_basic_webserver.sh new file mode 100644 index 00000000000..9df00a2be9d --- /dev/null +++ b/ci/build_basic_webserver.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash + +# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ +set -euxo pipefail + +git clone https://github.com/roc-lang/basic-webserver.git + +cd basic-webserver +git checkout more-features + +if [ "$(uname -s)" == "Linux" ]; then + + # check if musl-tools is installed + if ! dpkg -l | grep -q musl-tools; then + # install musl-tools with timeout for sudo problems with CI + timeout 300s sudo apt-get install -y musl-tools + fi + + cd basic-webserver/platform # we cd to install the target for the right rust version + if [ "$(uname -m)" == "x86_64" ]; then + rustup target add x86_64-unknown-linux-musl + elif [ "$(uname -m)" == "aarch64" ]; then + rustup target add aarch64-unknown-linux-musl + fi + cd ../.. +fi + +mv $(ls -d artifact/* | grep "roc_nightly.*tar\.gz" | grep "$1") ./roc_nightly.tar.gz + +# decompress the tar +tar -xzvf roc_nightly.tar.gz + +# delete tar +rm roc_nightly.tar.gz + +# simplify dir name +mv roc_nightly* roc_nightly + +cd roc_nightly + +# build the basic-webserver platform +./roc build ../basic-webserver/examples/echo.roc + +# We need this extra variable so we can safely check if $2 is empty later +EXTRA_ARGS=${2:-} + +# In some rare cases it's nice to be able to use the legacy linker, so we produce the .o file to be able to do that +if [ -n "${EXTRA_ARGS}" ]; + then ./roc build $EXTRA_ARGS ../basic-webserver/examples/echo.roc +fi + +cd .. From 4cb9b24f397f95d69a9f92288575b187d18256c6 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sun, 19 Nov 2023 13:41:58 +0100 Subject: [PATCH 22/27] chmod +x --- ci/build_basic_webserver.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 ci/build_basic_webserver.sh diff --git a/ci/build_basic_webserver.sh b/ci/build_basic_webserver.sh old mode 100644 new mode 100755 From ee74635afca7298b6500fef745fbcb0979647083 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sun, 19 Nov 2023 13:51:43 +0100 Subject: [PATCH 23/27] forgot cd --- ci/build_basic_webserver.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/build_basic_webserver.sh b/ci/build_basic_webserver.sh index 9df00a2be9d..dbdd036e984 100755 --- a/ci/build_basic_webserver.sh +++ b/ci/build_basic_webserver.sh @@ -7,6 +7,7 @@ git clone https://github.com/roc-lang/basic-webserver.git cd basic-webserver git checkout more-features +cd .. if [ "$(uname -s)" == "Linux" ]; then From a9c92735400fcafb27e5d405afb3b8b9fdb301fd Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sun, 19 Nov 2023 15:16:42 +0100 Subject: [PATCH 24/27] prevent undefined symbol --- ci/build_basic_webserver.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ci/build_basic_webserver.sh b/ci/build_basic_webserver.sh index dbdd036e984..dd5dc4d962f 100755 --- a/ci/build_basic_webserver.sh +++ b/ci/build_basic_webserver.sh @@ -9,7 +9,10 @@ cd basic-webserver git checkout more-features cd .. -if [ "$(uname -s)" == "Linux" ]; then +OS=$(uname -s) +ARCH=$(uname -m) + +if [ "$OS" == "Linux" ]; then # check if musl-tools is installed if ! dpkg -l | grep -q musl-tools; then @@ -18,9 +21,9 @@ if [ "$(uname -s)" == "Linux" ]; then fi cd basic-webserver/platform # we cd to install the target for the right rust version - if [ "$(uname -m)" == "x86_64" ]; then + if [ "$ARCH" == "x86_64" ]; then rustup target add x86_64-unknown-linux-musl - elif [ "$(uname -m)" == "aarch64" ]; then + elif [ "$ARCH" == "aarch64" ]; then rustup target add aarch64-unknown-linux-musl fi cd ../.. @@ -39,8 +42,11 @@ mv roc_nightly* roc_nightly cd roc_nightly -# build the basic-webserver platform -./roc build ../basic-webserver/examples/echo.roc +# prevent https://github.com/roc-lang/basic-webserver/issues/9 +if [ "$OS" != "Linux" ] || [ "$ARCH" != "x86_64" ]; then + # build the basic-webserver platform + ./roc build ../basic-webserver/examples/echo.roc +fi # We need this extra variable so we can safely check if $2 is empty later EXTRA_ARGS=${2:-} From 116aad26509885422a64d76c85affd9f6941ee27 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sun, 19 Nov 2023 15:44:32 +0100 Subject: [PATCH 25/27] get brotli started --- .github/workflows/basic_webserver_build_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/basic_webserver_build_release.yml b/.github/workflows/basic_webserver_build_release.yml index 41db268377c..1b35265b675 100644 --- a/.github/workflows/basic_webserver_build_release.yml +++ b/.github/workflows/basic_webserver_build_release.yml @@ -9,7 +9,7 @@ concurrency: env: # use .tar.gz for quick testing - ARCHIVE_FORMAT: .tar.gz + ARCHIVE_FORMAT: .tar.br BASIC_WEBSERVER_BRANCH: more-features jobs: From 71cb2ed8d980836771e3ed137b8ea511540e7719 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Mon, 20 Nov 2023 10:55:40 +0100 Subject: [PATCH 26/27] build with main branch --- .github/workflows/basic_webserver_build_release.yml | 2 +- ci/build_basic_webserver.sh | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/basic_webserver_build_release.yml b/.github/workflows/basic_webserver_build_release.yml index 1b35265b675..f71ffaa659d 100644 --- a/.github/workflows/basic_webserver_build_release.yml +++ b/.github/workflows/basic_webserver_build_release.yml @@ -10,7 +10,7 @@ concurrency: env: # use .tar.gz for quick testing ARCHIVE_FORMAT: .tar.br - BASIC_WEBSERVER_BRANCH: more-features + BASIC_WEBSERVER_BRANCH: main jobs: fetch-releases: diff --git a/ci/build_basic_webserver.sh b/ci/build_basic_webserver.sh index dd5dc4d962f..2157ed7141e 100755 --- a/ci/build_basic_webserver.sh +++ b/ci/build_basic_webserver.sh @@ -5,10 +5,6 @@ set -euxo pipefail git clone https://github.com/roc-lang/basic-webserver.git -cd basic-webserver -git checkout more-features -cd .. - OS=$(uname -s) ARCH=$(uname -m) From 75e04a5fe140c15f15044af3bc57e0f23d4171d2 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Mon, 20 Nov 2023 17:08:01 +0100 Subject: [PATCH 27/27] cleanup --- .github/workflows/basic_cli_build_release.yml | 2 +- .github/workflows/basic_webserver_build_release.yml | 2 +- .github/workflows/benchmarks.yml | 2 +- .github/workflows/devtools_test_linux_x86_64.yml | 2 +- .github/workflows/devtools_test_macos_apple_silicon.yml | 2 +- .github/workflows/macos_x86_64.yml | 2 +- .github/workflows/markdown_link_check.yml | 2 +- .github/workflows/nix_linux_arm64_cargo.yml | 2 +- .github/workflows/nix_linux_arm64_default.yml | 2 +- .github/workflows/nix_linux_x86_64.yml | 2 +- .github/workflows/nix_macos_apple_silicon.yml | 2 +- .github/workflows/nix_macos_x86_64.yml | 2 +- .github/workflows/spellcheck.yml | 2 +- .github/workflows/ubuntu_x86_64.yml | 2 +- .github/workflows/windows_release_build.yml | 2 +- .github/workflows/windows_tests.yml | 2 +- ci/build_basic_webserver.sh | 1 + 17 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index b08b97674ed..fa2176db1f6 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -77,7 +77,7 @@ jobs: basic-cli/src/linux-arm64.o build-macos-x86_64-files: - runs-on: [macos-11] # I expect the generated files to work on macOS 12 and 13 + runs-on: [macos-11] # I expect the generated files to work on macOS 12 and up needs: [fetch-releases] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/basic_webserver_build_release.yml b/.github/workflows/basic_webserver_build_release.yml index f71ffaa659d..f1cad661702 100644 --- a/.github/workflows/basic_webserver_build_release.yml +++ b/.github/workflows/basic_webserver_build_release.yml @@ -1,5 +1,5 @@ on: - pull_request: +# pull_request: workflow_dispatch: # this cancels workflows currently in progress if you start a new one diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index b682c6b1f96..4d016a3e3cd 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: Benchmarks diff --git a/.github/workflows/devtools_test_linux_x86_64.yml b/.github/workflows/devtools_test_linux_x86_64.yml index b6d332c5ac4..6c8d8b1e1c3 100644 --- a/.github/workflows/devtools_test_linux_x86_64.yml +++ b/.github/workflows/devtools_test_linux_x86_64.yml @@ -1,5 +1,5 @@ on: -# pull_request: + pull_request: name: devtools nix files test - linux diff --git a/.github/workflows/devtools_test_macos_apple_silicon.yml b/.github/workflows/devtools_test_macos_apple_silicon.yml index 45ce2e94c97..68027ecb00f 100644 --- a/.github/workflows/devtools_test_macos_apple_silicon.yml +++ b/.github/workflows/devtools_test_macos_apple_silicon.yml @@ -1,5 +1,5 @@ on: -# pull_request: + pull_request: name: devtools nix files test - macos diff --git a/.github/workflows/macos_x86_64.yml b/.github/workflows/macos_x86_64.yml index f2ea72dd964..809d7a02cfb 100644 --- a/.github/workflows/macos_x86_64.yml +++ b/.github/workflows/macos_x86_64.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: Macos x86-64 rust tests diff --git a/.github/workflows/markdown_link_check.yml b/.github/workflows/markdown_link_check.yml index 42fa2e9099f..1b60da4f8c7 100644 --- a/.github/workflows/markdown_link_check.yml +++ b/.github/workflows/markdown_link_check.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: schedule: - cron: '0 9 * * *' # 9=9am utc+0 diff --git a/.github/workflows/nix_linux_arm64_cargo.yml b/.github/workflows/nix_linux_arm64_cargo.yml index dc516db9133..52dfde0a2ee 100644 --- a/.github/workflows/nix_linux_arm64_cargo.yml +++ b/.github/workflows/nix_linux_arm64_cargo.yml @@ -1,5 +1,5 @@ on: -# pull_request: + pull_request: name: test cargo build on linux arm64 inside nix diff --git a/.github/workflows/nix_linux_arm64_default.yml b/.github/workflows/nix_linux_arm64_default.yml index 73ce60c4cfe..be06485367f 100644 --- a/.github/workflows/nix_linux_arm64_default.yml +++ b/.github/workflows/nix_linux_arm64_default.yml @@ -1,5 +1,5 @@ on: -# pull_request: + pull_request: name: test default.nix on linux arm64 diff --git a/.github/workflows/nix_linux_x86_64.yml b/.github/workflows/nix_linux_x86_64.yml index 5016113d50d..417674e9261 100644 --- a/.github/workflows/nix_linux_x86_64.yml +++ b/.github/workflows/nix_linux_x86_64.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: Nix linux x86_64 cargo test diff --git a/.github/workflows/nix_macos_apple_silicon.yml b/.github/workflows/nix_macos_apple_silicon.yml index 5ff6aef72ab..8958dbe0cf9 100644 --- a/.github/workflows/nix_macos_apple_silicon.yml +++ b/.github/workflows/nix_macos_apple_silicon.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: Nix apple silicon cargo test diff --git a/.github/workflows/nix_macos_x86_64.yml b/.github/workflows/nix_macos_x86_64.yml index 2e6880392cb..bad8246bb6e 100644 --- a/.github/workflows/nix_macos_x86_64.yml +++ b/.github/workflows/nix_macos_x86_64.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: Nix macOS x86_64 cargo test diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 4df7e7c22a8..36531f1a11f 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: SpellCheck diff --git a/.github/workflows/ubuntu_x86_64.yml b/.github/workflows/ubuntu_x86_64.yml index 51a85037976..462b2977783 100644 --- a/.github/workflows/ubuntu_x86_64.yml +++ b/.github/workflows/ubuntu_x86_64.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: CI diff --git a/.github/workflows/windows_release_build.yml b/.github/workflows/windows_release_build.yml index 916bdbba3dd..3fbff61d00f 100644 --- a/.github/workflows/windows_release_build.yml +++ b/.github/workflows/windows_release_build.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: windows - release build diff --git a/.github/workflows/windows_tests.yml b/.github/workflows/windows_tests.yml index 1b309ea2ee2..78f574be646 100644 --- a/.github/workflows/windows_tests.yml +++ b/.github/workflows/windows_tests.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: windows - subset of tests diff --git a/ci/build_basic_webserver.sh b/ci/build_basic_webserver.sh index 2157ed7141e..23460c90752 100755 --- a/ci/build_basic_webserver.sh +++ b/ci/build_basic_webserver.sh @@ -25,6 +25,7 @@ if [ "$OS" == "Linux" ]; then cd ../.. fi +# simplify tar name mv $(ls -d artifact/* | grep "roc_nightly.*tar\.gz" | grep "$1") ./roc_nightly.tar.gz # decompress the tar