From 4a7fe281b17498a3dcfedf725f2b313414ef0f07 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:09:35 +0200 Subject: [PATCH 01/17] test old linux nightly --- .github/workflows/test_nightly_many_os.yml | 32 +++++++--------------- ci/basic_nightly_test.sh | 30 ++++++++++++++++++++ 2 files changed, 40 insertions(+), 22 deletions(-) create mode 100755 ci/basic_nightly_test.sh diff --git a/.github/workflows/test_nightly_many_os.yml b/.github/workflows/test_nightly_many_os.yml index 8885a9c1862..e82c0a4520d 100644 --- a/.github/workflows/test_nightly_many_os.yml +++ b/.github/workflows/test_nightly_many_os.yml @@ -1,4 +1,5 @@ on: + pull_request: workflow_dispatch: name: Test latest nightly release for macOS, ubu 20.04, ubu 22.04 x86_64 @@ -26,24 +27,6 @@ jobs: if: startsWith(matrix.os, 'macos') run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_x86_64-latest.tar.gz - - name: remove everything in this dir except the tar # we want to test like a user who would have downloaded the release, so we clean up all files from the repo checkout - run: ls | grep -v "roc_nightly.*tar\.gz" | xargs rm -rf - - - name: decompress the tar - run: ls | grep "roc_nightly.*tar\.gz" | xargs tar -xzvf - - - name: delete tar - run: ls | grep "roc_nightly.*tar\.gz" | xargs rm -rf - - - name: rename nightly folder - run: mv roc_nightly* roc_nightly - - - name: test roc hello world - run: cd roc_nightly && ./roc examples/helloWorld.roc - - - name: test platform switching rust - run: cd roc_nightly && ./roc examples/platform-switching/rocLovesRust.roc - - name: get OS to use for zig download if: startsWith(matrix.os, 'ubuntu') run: echo "OS_TYPE=linux" >> $GITHUB_ENV @@ -59,11 +42,16 @@ jobs: - name: zig version run: zig version - - name: test platform switching zig - run: cd roc_nightly && ./roc examples/platform-switching/rocLovesZig.roc + - name: prep and run basic tests + run: ./ci/basic_nightly_test.sh + + - name: clean up, get old linux release (x86_64), run tests + if: startsWith(matrix.os, 'ubuntu') + run: | + rm -rf roc_nightly + curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-old_linux_x86_64-latest.tar.gz + ./ci/basic_nightly_test.sh - - name: test platform switching c - run: cd roc_nightly && ./roc examples/platform-switching/rocLovesC.roc diff --git a/ci/basic_nightly_test.sh b/ci/basic_nightly_test.sh new file mode 100755 index 00000000000..dedd6adc644 --- /dev/null +++ b/ci/basic_nightly_test.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ +set -euxo pipefail + +# Remove everything in this dir except the tar and ci folder. +# We want to test like a user who would have downloaded the release, so we clean up all files from the repo checkout. +ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$" | xargs rm -rf + +# decompress the tar +ls | grep "roc_nightly.*tar\.gz" | xargs tar -xzvf + +# delete tar +ls | grep "roc_nightly.*tar\.gz" | xargs rm -rf + +# rename nightly folder +mv roc_nightly* roc_nightly + +cd roc_nightly + +# test roc hello world +./roc examples/helloWorld.roc + +./roc examples/platform-switching/rocLovesRust.roc + +./roc examples/platform-switching/rocLovesZig.roc + +./roc examples/platform-switching/rocLovesC.roc + +cd .. \ No newline at end of file From ca5509f39ffd861b404a5dfbcd3fce49a530ed7a Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:55:22 +0200 Subject: [PATCH 02/17] add zig to script PATH Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/test_nightly_many_os.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_nightly_many_os.yml b/.github/workflows/test_nightly_many_os.yml index e82c0a4520d..5f4c7aeb934 100644 --- a/.github/workflows/test_nightly_many_os.yml +++ b/.github/workflows/test_nightly_many_os.yml @@ -43,13 +43,16 @@ jobs: run: zig version - name: prep and run basic tests - run: ./ci/basic_nightly_test.sh + run: | + ./ci/basic_nightly_test.sh + export PATH=$PATH:${GITHUB_WORKSPACE}/zig-${{env.OS_TYPE}}-x86_64-${ZIG_VERSION} - name: clean up, get old linux release (x86_64), run tests if: startsWith(matrix.os, 'ubuntu') run: | rm -rf roc_nightly curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-old_linux_x86_64-latest.tar.gz + export PATH=$PATH:${GITHUB_WORKSPACE}/zig-${{env.OS_TYPE}}-x86_64-${ZIG_VERSION} ./ci/basic_nightly_test.sh From d7887f480ded0e0ff7623e4ed6e2d1db2b4993df Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Mon, 17 Jul 2023 18:02:37 +0200 Subject: [PATCH 03/17] use ROC_ZIG to fix path issues Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/test_nightly_many_os.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test_nightly_many_os.yml b/.github/workflows/test_nightly_many_os.yml index 5f4c7aeb934..87a5e1c8a64 100644 --- a/.github/workflows/test_nightly_many_os.yml +++ b/.github/workflows/test_nightly_many_os.yml @@ -38,21 +38,26 @@ jobs: - name: Install zig run: | curl -fL -o zig.tar.xz https://ziglang.org/download/${ZIG_VERSION}/zig-${{env.OS_TYPE}}-x86_64-${ZIG_VERSION}.tar.xz && tar -xf zig.tar.xz - echo "${GITHUB_WORKSPACE}/zig-${{env.OS_TYPE}}-x86_64-${ZIG_VERSION}" >> $GITHUB_PATH + echo "ROC_ZIG=${GITHUB_WORKSPACE}/zig-${{env.OS_TYPE}}-x86_64-${ZIG_VERSION}/zig" >> $GITHUB_ENV + - name: zig version - run: zig version + env: + ROC_ZIG: ${{ env.ROC_ZIG }} + run: $ROC_ZIG version - name: prep and run basic tests + env: + ROC_ZIG: ${{ env.ROC_ZIG }} run: | ./ci/basic_nightly_test.sh - export PATH=$PATH:${GITHUB_WORKSPACE}/zig-${{env.OS_TYPE}}-x86_64-${ZIG_VERSION} - name: clean up, get old linux release (x86_64), run tests if: startsWith(matrix.os, 'ubuntu') + env: + ROC_ZIG: ${{ env.ROC_ZIG }} run: | rm -rf roc_nightly curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-old_linux_x86_64-latest.tar.gz - export PATH=$PATH:${GITHUB_WORKSPACE}/zig-${{env.OS_TYPE}}-x86_64-${ZIG_VERSION} ./ci/basic_nightly_test.sh From 78bf5dd73c233f0c02c17f16a89afd949c758b79 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 18 Jul 2023 10:56:17 +0200 Subject: [PATCH 04/17] test zig version inside script [skip ci] Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- ci/basic_nightly_test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/basic_nightly_test.sh b/ci/basic_nightly_test.sh index dedd6adc644..a988c7b7498 100755 --- a/ci/basic_nightly_test.sh +++ b/ci/basic_nightly_test.sh @@ -3,6 +3,9 @@ # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ set -euxo pipefail +# temp test +$ROC_ZIG version + # Remove everything in this dir except the tar and ci folder. # We want to test like a user who would have downloaded the release, so we clean up all files from the repo checkout. ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$" | xargs rm -rf @@ -27,4 +30,4 @@ cd roc_nightly ./roc examples/platform-switching/rocLovesC.roc -cd .. \ No newline at end of file +cd .. From 2189bd1a295eb9166bb9f835c61a4490687fdf5e Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 18 Jul 2023 11:03:03 +0200 Subject: [PATCH 05/17] allow ci run prevention --- .github/workflows/benchmarks.yml | 5 ++++- .github/workflows/macos_x86_64.yml | 5 ++++- .github/workflows/markdown_link_check.yml | 2 ++ .github/workflows/nix_linux_x86_64.yml | 5 ++++- .github/workflows/nix_macos_apple_silicon.yml | 5 ++++- .github/workflows/nix_macos_x86_64.yml | 5 ++++- .github/workflows/spellcheck.yml | 5 ++++- .github/workflows/ubuntu_x86_64.yml | 5 ++++- .github/workflows/windows_release_build.yml | 5 ++++- .github/workflows/windows_tests.yml | 5 ++++- 10 files changed, 38 insertions(+), 9 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 7566856d52d..7ae4203fc62 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -1,4 +1,7 @@ -on: [pull_request] +on: + pull_request: + commit-ignore: + - skipdefaultci name: Benchmarks diff --git a/.github/workflows/macos_x86_64.yml b/.github/workflows/macos_x86_64.yml index 8d112a2a53e..3124bfb26e8 100644 --- a/.github/workflows/macos_x86_64.yml +++ b/.github/workflows/macos_x86_64.yml @@ -1,4 +1,7 @@ -on: [pull_request] +on: + pull_request: + commit-ignore: + - skipdefaultci name: Macos x86-64 rust tests diff --git a/.github/workflows/markdown_link_check.yml b/.github/workflows/markdown_link_check.yml index 1b60da4f8c7..4272520e13b 100644 --- a/.github/workflows/markdown_link_check.yml +++ b/.github/workflows/markdown_link_check.yml @@ -1,5 +1,7 @@ on: pull_request: + commit-ignore: + - skipdefaultci 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 90406b3ddf3..053459c0754 100644 --- a/.github/workflows/nix_linux_x86_64.yml +++ b/.github/workflows/nix_linux_x86_64.yml @@ -1,4 +1,7 @@ -on: [pull_request] +on: + pull_request: + commit-ignore: + - skipdefaultci 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 d1d37969d4f..484471dafcc 100644 --- a/.github/workflows/nix_macos_apple_silicon.yml +++ b/.github/workflows/nix_macos_apple_silicon.yml @@ -1,4 +1,7 @@ -on: [pull_request] +on: + pull_request: + commit-ignore: + - skipdefaultci 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 53bd641fdc8..5657d8fef00 100644 --- a/.github/workflows/nix_macos_x86_64.yml +++ b/.github/workflows/nix_macos_x86_64.yml @@ -1,4 +1,7 @@ -on: [pull_request] +on: + pull_request: + commit-ignore: + - skipdefaultci name: Nix macOS x86_64 cargo test diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index 5ad79a396f1..b87f57dd157 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -1,4 +1,7 @@ -on: [pull_request] +on: + pull_request: + commit-ignore: + - skipdefaultci name: SpellCheck diff --git a/.github/workflows/ubuntu_x86_64.yml b/.github/workflows/ubuntu_x86_64.yml index fd7f81ddf0f..28f8f0a483c 100644 --- a/.github/workflows/ubuntu_x86_64.yml +++ b/.github/workflows/ubuntu_x86_64.yml @@ -1,4 +1,7 @@ -on: [pull_request] +on: + pull_request: + commit-ignore: + - skipdefaultci name: CI diff --git a/.github/workflows/windows_release_build.yml b/.github/workflows/windows_release_build.yml index a889900b0cf..4a21902a96a 100644 --- a/.github/workflows/windows_release_build.yml +++ b/.github/workflows/windows_release_build.yml @@ -1,4 +1,7 @@ -on: [pull_request] +on: + pull_request: + commit-ignore: + - skipdefaultci name: windows - release build diff --git a/.github/workflows/windows_tests.yml b/.github/workflows/windows_tests.yml index 2fe095b711b..932139b0030 100644 --- a/.github/workflows/windows_tests.yml +++ b/.github/workflows/windows_tests.yml @@ -1,4 +1,7 @@ -on: [pull_request] +on: + pull_request: + commit-ignore: + - skipdefaultci name: windows - subset of tests From 52dd4c5a6e6b14191d552e12325c0d095b4d1b08 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 18 Jul 2023 11:04:43 +0200 Subject: [PATCH 06/17] dummy change skipdefaultci --- .github/workflows/ubuntu_x86_64.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ubuntu_x86_64.yml b/.github/workflows/ubuntu_x86_64.yml index 28f8f0a483c..506a39a3188 100644 --- a/.github/workflows/ubuntu_x86_64.yml +++ b/.github/workflows/ubuntu_x86_64.yml @@ -64,7 +64,6 @@ jobs: run: ./ci/www-repl.sh && sccache --show-stats #TODO i386 (32-bit linux) cli tests - #TODO verify-no-git-changes - name: test website build script From 215c7ce40e5237f148a9dfb0e8ab8ae285f24c6b Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 18 Jul 2023 13:20:27 +0200 Subject: [PATCH 07/17] use zig from action --- .github/workflows/benchmarks.yml | 4 +-- .github/workflows/macos_x86_64.yml | 4 +-- .github/workflows/markdown_link_check.yml | 4 +-- .github/workflows/nix_linux_x86_64.yml | 4 +-- .github/workflows/nix_macos_apple_silicon.yml | 4 +-- .github/workflows/nix_macos_x86_64.yml | 4 +-- .github/workflows/spellcheck.yml | 4 +-- .github/workflows/test_nightly_many_os.yml | 28 +++---------------- .github/workflows/ubuntu_x86_64.yml | 4 +-- .github/workflows/windows_release_build.yml | 4 +-- .github/workflows/windows_tests.yml | 4 +-- ci/basic_nightly_test.sh | 2 +- 12 files changed, 15 insertions(+), 55 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 7ae4203fc62..b682c6b1f96 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -1,7 +1,5 @@ on: - pull_request: - commit-ignore: - - skipdefaultci + #pull_request: name: Benchmarks diff --git a/.github/workflows/macos_x86_64.yml b/.github/workflows/macos_x86_64.yml index 3124bfb26e8..2598a9783e9 100644 --- a/.github/workflows/macos_x86_64.yml +++ b/.github/workflows/macos_x86_64.yml @@ -1,7 +1,5 @@ on: - pull_request: - commit-ignore: - - skipdefaultci + #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 4272520e13b..42fa2e9099f 100644 --- a/.github/workflows/markdown_link_check.yml +++ b/.github/workflows/markdown_link_check.yml @@ -1,7 +1,5 @@ on: - pull_request: - commit-ignore: - - skipdefaultci + #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 053459c0754..c86e12af5c8 100644 --- a/.github/workflows/nix_linux_x86_64.yml +++ b/.github/workflows/nix_linux_x86_64.yml @@ -1,7 +1,5 @@ on: - pull_request: - commit-ignore: - - skipdefaultci + #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 484471dafcc..09fe8922bf3 100644 --- a/.github/workflows/nix_macos_apple_silicon.yml +++ b/.github/workflows/nix_macos_apple_silicon.yml @@ -1,7 +1,5 @@ on: - pull_request: - commit-ignore: - - skipdefaultci + #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 5657d8fef00..b5aa5fed379 100644 --- a/.github/workflows/nix_macos_x86_64.yml +++ b/.github/workflows/nix_macos_x86_64.yml @@ -1,7 +1,5 @@ on: - pull_request: - commit-ignore: - - skipdefaultci + #pull_request: name: Nix macOS x86_64 cargo test diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index b87f57dd157..bbdf5ee4e3a 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -1,7 +1,5 @@ on: - pull_request: - commit-ignore: - - skipdefaultci + #pull_request: name: SpellCheck diff --git a/.github/workflows/test_nightly_many_os.yml b/.github/workflows/test_nightly_many_os.yml index 87a5e1c8a64..122c6d6c565 100644 --- a/.github/workflows/test_nightly_many_os.yml +++ b/.github/workflows/test_nightly_many_os.yml @@ -4,9 +4,6 @@ on: name: Test latest nightly release for macOS, ubu 20.04, ubu 22.04 x86_64 -env: - ZIG_VERSION: 0.9.1 - jobs: test-nightly: name: test nightly macos 11, macos 12, ubu 20.04, ubu 22.04 @@ -18,6 +15,9 @@ jobs: timeout-minutes: 90 steps: - uses: actions/checkout@v3 + - uses: goto-bus-stop/setup-zig@v2 + with: + version: 0.9.1 - name: get the latest release archive for linux (x86_64) if: startsWith(matrix.os, 'ubuntu') @@ -27,34 +27,14 @@ jobs: if: startsWith(matrix.os, 'macos') run: curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-macos_x86_64-latest.tar.gz - - name: get OS to use for zig download - if: startsWith(matrix.os, 'ubuntu') - run: echo "OS_TYPE=linux" >> $GITHUB_ENV - - - name: get OS to use for zig download - if: startsWith(matrix.os, 'macos') - run: echo "OS_TYPE=macos" >> $GITHUB_ENV - - - name: Install zig - run: | - curl -fL -o zig.tar.xz https://ziglang.org/download/${ZIG_VERSION}/zig-${{env.OS_TYPE}}-x86_64-${ZIG_VERSION}.tar.xz && tar -xf zig.tar.xz - echo "ROC_ZIG=${GITHUB_WORKSPACE}/zig-${{env.OS_TYPE}}-x86_64-${ZIG_VERSION}/zig" >> $GITHUB_ENV - - - name: zig version - env: - ROC_ZIG: ${{ env.ROC_ZIG }} - run: $ROC_ZIG version + - run: zig version - name: prep and run basic tests - env: - ROC_ZIG: ${{ env.ROC_ZIG }} run: | ./ci/basic_nightly_test.sh - name: clean up, get old linux release (x86_64), run tests if: startsWith(matrix.os, 'ubuntu') - env: - ROC_ZIG: ${{ env.ROC_ZIG }} run: | rm -rf roc_nightly curl -fOL https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-old_linux_x86_64-latest.tar.gz diff --git a/.github/workflows/ubuntu_x86_64.yml b/.github/workflows/ubuntu_x86_64.yml index 506a39a3188..709428b06dc 100644 --- a/.github/workflows/ubuntu_x86_64.yml +++ b/.github/workflows/ubuntu_x86_64.yml @@ -1,7 +1,5 @@ on: - pull_request: - commit-ignore: - - skipdefaultci + #pull_request: name: CI diff --git a/.github/workflows/windows_release_build.yml b/.github/workflows/windows_release_build.yml index 4a21902a96a..8da32001b3e 100644 --- a/.github/workflows/windows_release_build.yml +++ b/.github/workflows/windows_release_build.yml @@ -1,7 +1,5 @@ on: - pull_request: - commit-ignore: - - skipdefaultci + #pull_request: name: windows - release build diff --git a/.github/workflows/windows_tests.yml b/.github/workflows/windows_tests.yml index 932139b0030..051e63344ab 100644 --- a/.github/workflows/windows_tests.yml +++ b/.github/workflows/windows_tests.yml @@ -1,7 +1,5 @@ on: - pull_request: - commit-ignore: - - skipdefaultci + #pull_request: name: windows - subset of tests diff --git a/ci/basic_nightly_test.sh b/ci/basic_nightly_test.sh index a988c7b7498..8a5285f814b 100755 --- a/ci/basic_nightly_test.sh +++ b/ci/basic_nightly_test.sh @@ -4,7 +4,7 @@ set -euxo pipefail # temp test -$ROC_ZIG version +zig version # Remove everything in this dir except the tar and ci folder. # We want to test like a user who would have downloaded the release, so we clean up all files from the repo checkout. From 425b3cf3861d12c507e67c4d5497bdce043ef665 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:07:00 +0200 Subject: [PATCH 08/17] indent fix Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- .github/workflows/test_nightly_many_os.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_nightly_many_os.yml b/.github/workflows/test_nightly_many_os.yml index 122c6d6c565..913c13406f3 100644 --- a/.github/workflows/test_nightly_many_os.yml +++ b/.github/workflows/test_nightly_many_os.yml @@ -16,8 +16,8 @@ jobs: steps: - uses: actions/checkout@v3 - uses: goto-bus-stop/setup-zig@v2 - with: - version: 0.9.1 + with: + version: 0.9.1 - name: get the latest release archive for linux (x86_64) if: startsWith(matrix.os, 'ubuntu') From b82df28b464f3d7776de072b904fc8e2addbeb2b Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 18 Jul 2023 16:15:56 +0200 Subject: [PATCH 09/17] only run rm if there is input Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- ci/basic_nightly_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/basic_nightly_test.sh b/ci/basic_nightly_test.sh index 8a5285f814b..08e056bfd8f 100755 --- a/ci/basic_nightly_test.sh +++ b/ci/basic_nightly_test.sh @@ -8,7 +8,7 @@ zig version # Remove everything in this dir except the tar and ci folder. # We want to test like a user who would have downloaded the release, so we clean up all files from the repo checkout. -ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$" | xargs rm -rf +ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$" | xargs -r rm -rf # decompress the tar ls | grep "roc_nightly.*tar\.gz" | xargs tar -xzvf From 574428b5c4ea7436d4244e1aa49b3630fe24cb56 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 18 Jul 2023 18:15:27 +0200 Subject: [PATCH 10/17] debug grep output Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- ci/basic_nightly_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/basic_nightly_test.sh b/ci/basic_nightly_test.sh index 08e056bfd8f..b93d05b1f5d 100755 --- a/ci/basic_nightly_test.sh +++ b/ci/basic_nightly_test.sh @@ -8,7 +8,7 @@ zig version # Remove everything in this dir except the tar and ci folder. # We want to test like a user who would have downloaded the release, so we clean up all files from the repo checkout. -ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$" | xargs -r rm -rf +ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$" # decompress the tar ls | grep "roc_nightly.*tar\.gz" | xargs tar -xzvf From 8801fe6b8da7eaaa4f3e1cad5c8a8053f8c5ebbd Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 18 Jul 2023 19:51:42 +0200 Subject: [PATCH 11/17] try for loop Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- ci/basic_nightly_test.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ci/basic_nightly_test.sh b/ci/basic_nightly_test.sh index b93d05b1f5d..faeb9a1615e 100755 --- a/ci/basic_nightly_test.sh +++ b/ci/basic_nightly_test.sh @@ -8,7 +8,13 @@ zig version # Remove everything in this dir except the tar and ci folder. # We want to test like a user who would have downloaded the release, so we clean up all files from the repo checkout. -ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$" +to_delete=$(ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$") + +for file_or_dir in $to_delete +do + echo "Removing: $file_or_dir" + rm -rf "$file_or_dir" +done # decompress the tar ls | grep "roc_nightly.*tar\.gz" | xargs tar -xzvf From 29a5588acadd9e6221be61eeb192e95a7d7a98c7 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sat, 22 Jul 2023 17:38:32 +0200 Subject: [PATCH 12/17] unset var fix Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- ci/basic_nightly_test.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/ci/basic_nightly_test.sh b/ci/basic_nightly_test.sh index faeb9a1615e..4c801b9cecf 100755 --- a/ci/basic_nightly_test.sh +++ b/ci/basic_nightly_test.sh @@ -6,15 +6,19 @@ set -euxo pipefail # temp test zig version -# Remove everything in this dir except the tar and ci folder. -# We want to test like a user who would have downloaded the release, so we clean up all files from the repo checkout. -to_delete=$(ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$") - -for file_or_dir in $to_delete -do +# if to prevent unset vars errror +if [ -n "$(ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$")" ]; then + + # Remove everything in this dir except the tar and ci folder. + # We want to test like a user who would have downloaded the release, so we clean up all files from the repo checkout. + to_delete=$(ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$") + + for file_or_dir in $to_delete + do echo "Removing: $file_or_dir" rm -rf "$file_or_dir" -done + done +fi # decompress the tar ls | grep "roc_nightly.*tar\.gz" | xargs tar -xzvf From d005cca85403722972be408f0ff09467f8ba2b65 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sat, 22 Jul 2023 17:45:38 +0200 Subject: [PATCH 13/17] dry Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- ci/basic_nightly_test.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ci/basic_nightly_test.sh b/ci/basic_nightly_test.sh index 4c801b9cecf..add97e68746 100755 --- a/ci/basic_nightly_test.sh +++ b/ci/basic_nightly_test.sh @@ -6,12 +6,13 @@ set -euxo pipefail # temp test zig version -# if to prevent unset vars errror -if [ -n "$(ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$")" ]; then - # Remove everything in this dir except the tar and ci folder. - # We want to test like a user who would have downloaded the release, so we clean up all files from the repo checkout. - to_delete=$(ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$") +# Remove everything in this dir except the tar and ci folder. +# We want to test like a user who would have downloaded the release, so we clean up all files from the repo checkout. +to_delete=$(ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$") + +# if to prevent unset vars errror +if [ -n "$to_delete" ]; then for file_or_dir in $to_delete do From d66055bf975166242ff450d2dcb3d6a148c7bfc3 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sat, 22 Jul 2023 17:48:32 +0200 Subject: [PATCH 14/17] undo last commit Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- ci/basic_nightly_test.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ci/basic_nightly_test.sh b/ci/basic_nightly_test.sh index add97e68746..4c801b9cecf 100755 --- a/ci/basic_nightly_test.sh +++ b/ci/basic_nightly_test.sh @@ -6,13 +6,12 @@ set -euxo pipefail # temp test zig version - -# Remove everything in this dir except the tar and ci folder. -# We want to test like a user who would have downloaded the release, so we clean up all files from the repo checkout. -to_delete=$(ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$") - # if to prevent unset vars errror -if [ -n "$to_delete" ]; then +if [ -n "$(ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$")" ]; then + + # Remove everything in this dir except the tar and ci folder. + # We want to test like a user who would have downloaded the release, so we clean up all files from the repo checkout. + to_delete=$(ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$") for file_or_dir in $to_delete do From fbe2954d12d641f960668c6eb071f5a99b93cbcb Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sat, 22 Jul 2023 17:53:32 +0200 Subject: [PATCH 15/17] re-enable PR trigger --- .github/workflows/basic_cli_build_release.yml | 2 +- .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 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 01c92664548..8c239260bfa 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/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/macos_x86_64.yml b/.github/workflows/macos_x86_64.yml index 2598a9783e9..fc3527fa292 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_x86_64.yml b/.github/workflows/nix_linux_x86_64.yml index c86e12af5c8..647adf6fa57 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 09fe8922bf3..0f00277d2cd 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 b5aa5fed379..7c9e43aa281 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 bbdf5ee4e3a..fb7f9284c0c 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 709428b06dc..a411f73d120 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 8da32001b3e..28452089557 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 051e63344ab..3fce2a66cb1 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 From 408a891b76c51c8756f9883fe83f9db94edd944a Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sat, 22 Jul 2023 18:41:41 +0200 Subject: [PATCH 16/17] enabled too much --- .github/workflows/basic_cli_build_release.yml | 2 +- .github/workflows/test_nightly_many_os.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 8c239260bfa..01c92664548 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/test_nightly_many_os.yml b/.github/workflows/test_nightly_many_os.yml index 913c13406f3..aeb25e52d6b 100644 --- a/.github/workflows/test_nightly_many_os.yml +++ b/.github/workflows/test_nightly_many_os.yml @@ -1,5 +1,5 @@ on: - pull_request: + #pull_request: workflow_dispatch: name: Test latest nightly release for macOS, ubu 20.04, ubu 22.04 x86_64 From c2eecb78651a8dcfd22d0195b508a17006619501 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Sat, 22 Jul 2023 19:45:07 +0200 Subject: [PATCH 17/17] removed temp line Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --- ci/basic_nightly_test.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/ci/basic_nightly_test.sh b/ci/basic_nightly_test.sh index 4c801b9cecf..dca5da8ae03 100755 --- a/ci/basic_nightly_test.sh +++ b/ci/basic_nightly_test.sh @@ -3,9 +3,6 @@ # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/ set -euxo pipefail -# temp test -zig version - # if to prevent unset vars errror if [ -n "$(ls | grep -v "roc_nightly.*tar\.gz" | grep -v "^ci$")" ]; then