From 117fa442f800876d774b2f5c3215785986746f6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Mon, 13 Jan 2020 22:42:47 -0700 Subject: Build and run Rust tests --- .github/workflows/CI.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to '.github') diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 52caf55..3a5069d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -50,3 +50,15 @@ jobs: - name: Install GFortran macOS if: contains( matrix.os, 'macos') run: brew install gcc@${GCC_V} || brew upgrade gcc@${GCC_V} || true + + - name: Build + run: cargo build --verbose + + - name: Run tests + run: cargo test --verbose + + # TODO: integrate these with `cargo test` above + - name: Run manual tests + run: | + cargo run -- --help + ./run_tests.sh -- cgit v1.2.3 From b63872f0c4b236a60f86dbd683faa82f5a2a4650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Mon, 13 Jan 2020 22:49:04 -0700 Subject: Install Rust on macOS --- .github/workflows/CI.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.github') diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3a5069d..b63f9fe 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -47,6 +47,10 @@ jobs: --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \ --slave /usr/bingcov gcov /usr/bin/gcov-${GCC_V} + - name: Install Rust macOS + if: contains( matrix.os, 'macos') + run: curl https://sh.rustup.rs -sSf | sh -s -- -y + - name: Install GFortran macOS if: contains( matrix.os, 'macos') run: brew install gcc@${GCC_V} || brew upgrade gcc@${GCC_V} || true -- cgit v1.2.3 From cb2df62f163e8d497f65ff1b340786090c5dcacd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Mon, 13 Jan 2020 22:53:18 -0700 Subject: Put Cargo in PATH and test it --- .github/workflows/CI.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.github') diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b63f9fe..350e1b1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -49,7 +49,11 @@ jobs: - name: Install Rust macOS if: contains( matrix.os, 'macos') - run: curl https://sh.rustup.rs -sSf | sh -s -- -y + run: | + curl https://sh.rustup.rs -sSf | sh -s -- -y + export PATH="$HOME/.cargo/bin:$PATH" + which cargo + cargo - name: Install GFortran macOS if: contains( matrix.os, 'macos') -- cgit v1.2.3 From f1c84a0da7ee832b989736aaf1ff3f3fdff8a2e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Mon, 13 Jan 2020 22:56:09 -0700 Subject: Put Cargo in PATH in all relevant sections --- .github/workflows/CI.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to '.github') diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 350e1b1..775e4f5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -51,22 +51,24 @@ jobs: if: contains( matrix.os, 'macos') run: | curl https://sh.rustup.rs -sSf | sh -s -- -y - export PATH="$HOME/.cargo/bin:$PATH" - which cargo - cargo - name: Install GFortran macOS if: contains( matrix.os, 'macos') run: brew install gcc@${GCC_V} || brew upgrade gcc@${GCC_V} || true - name: Build - run: cargo build --verbose + run: | + export PATH="$HOME/.cargo/bin:$PATH" + cargo build --verbose - name: Run tests - run: cargo test --verbose + run: | + export PATH="$HOME/.cargo/bin:$PATH" + cargo test --verbose # TODO: integrate these with `cargo test` above - name: Run manual tests run: | + export PATH="$HOME/.cargo/bin:$PATH" cargo run -- --help ./run_tests.sh -- cgit v1.2.3