@@ -13,7 +13,7 @@ permissions: {}
1313env :
1414 # use .tar.gz for quick testing
1515 ARCHIVE_FORMAT : .tar.br
16- RELEASE_TAG : 0.12 .0
16+ RELEASE_TAG : 0.13 .0
1717
1818jobs :
1919 fetch-releases :
6767 - name : build basic-webserver
6868 env :
6969 CARGO_BUILD_TARGET : aarch64-unknown-linux-musl
70- CC_aarch64_unknown_linux_musl : clang-18
71- AR_aarch64_unknown_linux_musl : llvm-ar-18
72- CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS : " -Clink-self-contained=yes -Clinker=rust-lld"
7370 run : ./ci/build_basic_webserver.sh linux_arm64
7471
7572 - name : Save .a file
@@ -185,3 +182,94 @@ jobs:
185182 name : release-assets-docs
186183 path : |
187184 docs.tar.gz
185+
186+ test-release :
187+ needs : [create-release-archive]
188+ strategy :
189+ matrix :
190+ os : [ubuntu-22.04, ubuntu-24.04, ubuntu-24.04-arm, macos-13, macos-14, macos-15]
191+ runs-on : ${{ matrix.os }}
192+ steps :
193+ - name : Download the previously uploaded files
194+ uses : actions/download-artifact@v4
195+
196+ - name : Set OS-specific variables
197+ id : vars
198+ run : |
199+ if [[ "${{ matrix.os }}" =~ ^ubuntu-.*-arm$ ]]; then
200+ echo "os_pattern=linux_arm64" >> $GITHUB_OUTPUT
201+ elif [[ "${{ matrix.os }}" =~ ^ubuntu- ]]; then
202+ echo "os_pattern=linux_x86_64" >> $GITHUB_OUTPUT
203+ elif [ "${{ matrix.os }}" = "macos-13" ]; then
204+ echo "os_pattern=macos_x86_64" >> $GITHUB_OUTPUT
205+ else
206+ echo "os_pattern=macos_apple_silicon" >> $GITHUB_OUTPUT
207+ fi
208+
209+ - name : mv roc nightly and simplify name
210+ run : mv $(ls -d artifact/* | grep "roc_nightly.*tar\.gz" | grep "${{ steps.vars.outputs.os_pattern }}") ./roc_nightly.tar.gz
211+
212+ - name : decompress the tar
213+ run : tar -xzvf roc_nightly.tar.gz
214+
215+ - name : delete tar
216+ run : rm roc_nightly.tar.gz
217+
218+ - name : rename nightly folder
219+ run : mv roc_nightly* roc_nightly
220+
221+ - if : contains(env.ARCHIVE_FORMAT, 'gz')
222+ run : |
223+ cd basic-webserver-platform && ls | grep "tar" | xargs tar -xzf
224+
225+ - if : contains(env.ARCHIVE_FORMAT, 'br')
226+ run : |
227+ cd basic-webserver-platform && ls | grep "tar" | xargs brotli -d
228+ ls | grep "tar$" | xargs tar -xf
229+
230+ - name : Install dependencies (Ubuntu)
231+ if : startsWith(matrix.os, 'ubuntu-')
232+ run : |
233+ sudo apt install -y expect ncat ripgrep
234+
235+ - name : Install dependencies (macOS)
236+ if : startsWith(matrix.os, 'macos-')
237+ run : |
238+ brew install expect # for tests
239+ brew install nmap # includes ncat server for tcp tests
240+ brew install ripgrep # for ci/check_all_exposed_funs_tested.roc
241+
242+ - name : prepare testing
243+ run : |
244+ mv roc_nightly basic-webserver-platform/.
245+ cd basic-webserver-platform
246+ mkdir platform
247+ # move all files to platform dir
248+ find . -maxdepth 1 -type f -exec mv {} platform/ \;
249+ # move all dirs (except roc_nightly) to platform dir
250+ find . -maxdepth 1 -type d ! -name 'platform' ! -name 'roc_nightly' -exec mv {} platform/ \;
251+
252+ mkdir temp-basic-webserver
253+ cd temp-basic-webserver
254+ git clone https://github.com/roc-lang/basic-webserver.git
255+ cd basic-webserver
256+ git checkout ${{ env.RELEASE_TAG }}
257+ cp -r examples ../..
258+ cp -r tests ../..
259+ cp -r ci ../..
260+ # LICENSE is necessary for command test
261+ cp -r LICENSE ../..
262+
263+ - name : Remove things that dont work on musl
264+ if : startsWith(matrix.os, 'ubuntu-')
265+ run : |
266+ rm basic-webserver-platform/ci/expect_scripts/file-accessed-modified-created-time.exp
267+ rm basic-webserver-platform/examples/file-accessed-modified-created-time.roc
268+ sed -i.bak -e '/time_accessed!,$/d' -e '/time_modified!,$/d' -e '/time_created!,$/d' -e '/^time_accessed!/,/^$/d' -e '/^time_modified!/,/^$/d' -e '/^time_created!/,/^$/d' -e '/^import Utc exposing \[Utc\]$/d' basic-webserver-platform/platform/File.roc
269+ rm basic-webserver-platform/platform/File.roc.bak
270+
271+ - name : run tests
272+ run : |
273+ # no need to build platform anymore
274+ cd basic-webserver-platform
275+ NO_BUILD=1 ROC=./roc_nightly/roc EXAMPLES_DIR=./examples/ ./ci/all_tests.sh
0 commit comments