From 78343c2a805bd150d9aac124c55be8cb8e30ce10 Mon Sep 17 00:00:00 2001 From: bogay Date: Thu, 11 May 2023 22:28:42 +0800 Subject: [PATCH 1/3] fix(sandbox): remove extra 300ms time limit --- sandbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sandbox.c b/sandbox.c index e08ec13..5462c5b 100644 --- a/sandbox.c +++ b/sandbox.c @@ -57,7 +57,7 @@ int main(int argc, char **argv) output_limit = strtol(argv[9], NULL, 10), process_limit = strtol(argv[10], NULL, 10); - time_limit_to_watch = time_limit + 300; + time_limit_to_watch = time_limit; char *program = 0; char **program_argv = 0; From 9b26c9cd25e08e5cf7c5d3bd26498fdc148f87ce Mon Sep 17 00:00:00 2001 From: bogay Date: Thu, 11 May 2023 22:34:25 +0800 Subject: [PATCH 2/3] ci: build --- .github/workflows/build.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..75d5a7a --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,22 @@ +name: Build +on: + pull_request: + +jobs: + build: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install dependeny + run: apt install -y libseccomp-dev libseccomp2 seccomp + + - name: Build binary + run: make + + - uses: actions/upload-artifact@v3 + with: + name: sandbox + path: sandbox From f9adec88667290c798141d887cb648fe25ae6e4b Mon Sep 17 00:00:00 2001 From: bogay Date: Thu, 11 May 2023 22:39:41 +0800 Subject: [PATCH 3/3] ci: use sudo apt to install packages see more: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#administrative-privileges --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 75d5a7a..f2da379 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v3 - name: Install dependeny - run: apt install -y libseccomp-dev libseccomp2 seccomp + run: sudo apt install -y libseccomp-dev libseccomp2 seccomp - name: Build binary run: make