Merge pull request #3849 from roc-lang/small-ci-rebirth

set up small-ci again
This commit is contained in:
Anton-4 2022-08-22 15:46:45 +02:00 committed by GitHub
commit 172e58f96b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 55 additions and 2 deletions

51
.github/workflows/ubuntu_x86_64.yml vendored Normal file
View File

@ -0,0 +1,51 @@
on: [pull_request]
name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
jobs:
test-zig-rust-wasm:
name: test zig, rust, wasm
runs-on: [self-hosted, i5-4690K]
timeout-minutes: 90
env:
RUSTC_WRAPPER: /home/small-ci-user/.cargo/bin/sccache
steps:
- uses: actions/checkout@v2
with:
clean: "true"
- name: zig fmt check, zig tests
run: cd crates/compiler/builtins/bitcode && ./run-tests.sh
- name: zig wasm tests
run: cd crates/compiler/builtins/bitcode && ./run-wasm-tests.sh
- name: regular rust tests
run: cargo test --locked --release --features with_sound serde --workspace && sccache --show-stats
- name: test the dev backend # these tests require an explicit feature flag
run: cargo test --locked --release --package test_gen --no-default-features --features gen-dev && sccache --show-stats
- name: test gen-wasm single threaded # gen-wasm has some multithreading problems to do with the wasmer runtime
run: cargo test --locked --release --package test_gen --no-default-features --features gen-wasm -- --test-threads=1 && sccache --show-stats
- name: run `roc test` on Str builtins
run: cargo run --locked --release -- test crates/compiler/builtins/roc/Str.roc && sccache --show-stats
#TODO pass --locked into the script here as well, this avoids rebuilding dependencies unnecessarily
- name: wasm repl test
run: crates/repl_test/test_wasm.sh && sccache --show-stats
#TODO i386 (32-bit linux) cli tests
#TODO verify-no-git-changes
- name: test website build script
run: REPL_DEBUG=1 bash www/build.sh

View File

@ -1,9 +1,10 @@
#!/usr/bin/env bash
# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
set -euxo pipefail
# Test every zig
# Execute zig tests (see build.zig)
zig build test
# fmt every zig
# check formatting of zig files
find src/*.zig -type f -print0 | xargs -n 1 -0 zig fmt --check || (echo "zig fmt --check FAILED! Check the previous lines to see which files were improperly formatted." && exit 1)

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash
# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
set -euxo pipefail
# Test failures will always point at the _start function