Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,44 @@ jobs:
run: scan-build -o analyzer-report make -C jtl/cmake-build -j4
- name: Check that report is empty
run: '[ -z "$(ls -A analyzer-report)" ]'
e2e-build:
env:
DOCKER_BUILDKIT: "1"
runs-on: ubuntu-20.04
timeout-minutes: 15
steps:
- name: Fetch sources
uses: actions/checkout@v2
- name: Setup cache
uses: Swatinem/rust-cache@v1
- name: Build e2e artifacts
run: bash ci/e2e-build.sh
- name: Upload e2e artifacts
uses: actions/upload-artifact@v2
with:
name: e2e-artifacts
path: e2e-artifacts
retention-days: "2"
e2e-run:
needs: e2e-build
runs-on: ubuntu-20.04
timeout-minutes: 15
steps:
- name: Fetch sources
uses: actions/checkout@v2
- name: Download e2e artifacts
uses: actions/download-artifact@v2
with:
name: e2e-artifacts
path: e2e-artifacts
- name: Execute tests
run: bash ci/e2e-run.sh
- name: Upload logs
uses: actions/upload-artifact@v2
with:
name: e2e-logs
path: e2e-logs
retention-days: "2"
misspell:
runs-on: ubuntu-20.04
timeout-minutes: 2
Expand Down
2 changes: 1 addition & 1 deletion bors.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
delete-merged-branches = true
status = ["check-ci-config", "rustfmt", "rust-unit-tests", "rust-unused-deps", "rust-cargo-deny", "rust-lint", "cpp-lint"]
status = ["check-ci-config", "e2e-build", "e2e-run", "rustfmt", "rust-unit-tests", "rust-unused-deps", "rust-cargo-deny", "rust-lint", "cpp-lint"]
timeout-sec = 900
2 changes: 0 additions & 2 deletions ci/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# TODO: integration tests
noE2e: true
# TODO: add artifacts
noPublish: true
buildTimeoutMinutes: 15
6 changes: 6 additions & 0 deletions ci/e2e-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euxo pipefail

mkdir e2e-artifacts
cargo install --path cli
cp ~/.cargo/bin/pps-cli e2e-artifacts/pps-cli
11 changes: 11 additions & 0 deletions ci/e2e-run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euxo pipefail

sudo chmod +x ./e2e-artifacts/pps-cli

python3 make-build-env.py --out $HOME/build-env
export JJS_PATH=$HOME/build-env
for i in a-plus-b array-sum sqrt; do
mkdir -p ./out/$i
./e2e-artifacts/pps-cli compile --pkg example-problems/$i --out ./out/$i
done