diff --git a/.github/workflows/push_c.yml b/.github/workflows/c.yml similarity index 90% rename from .github/workflows/push_c.yml rename to .github/workflows/c.yml index b1838a0..2a8d8e4 100644 --- a/.github/workflows/push_c.yml +++ b/.github/workflows/c.yml @@ -2,11 +2,15 @@ name: Test for C implementations on: push: branches: [main] + pull_request: + branches: [main] jobs: test: name: Run test - runs-on: ubuntu-22.04 + runs-on: self-hosted + container: + image: buildpack-deps:jammy defaults: run: working-directory: ./test diff --git a/.github/workflows/push_cpp.yml b/.github/workflows/cpp.yml similarity index 83% rename from .github/workflows/push_cpp.yml rename to .github/workflows/cpp.yml index cfc56e1..f5daf9a 100644 --- a/.github/workflows/push_cpp.yml +++ b/.github/workflows/cpp.yml @@ -2,11 +2,15 @@ name: Test for C++ implementations on: push: branches: [main] + pull_request: + branches: [main] jobs: test: name: Run test - runs-on: ubuntu-22.04 + runs-on: self-hosted + container: + image: buildpack-deps:jammy defaults: run: working-directory: ./test diff --git a/.github/workflows/push_haskell.yml b/.github/workflows/haskell.yml similarity index 89% rename from .github/workflows/push_haskell.yml rename to .github/workflows/haskell.yml index bff0775..b3da9d0 100644 --- a/.github/workflows/push_haskell.yml +++ b/.github/workflows/haskell.yml @@ -2,11 +2,15 @@ name: Test for Haskell implementations on: push: branches: [main] + pull_request: + branches: [main] jobs: test: name: Run test - runs-on: ubuntu-22.04 + runs-on: self-hosted + container: + image: haskell:9 defaults: run: working-directory: ./test @@ -42,4 +46,4 @@ jobs: run: ./test_maker .test/nsy.test - name: Run test run: ./test ../nsy/haskell/nsy - timeout-minutes: 5 \ No newline at end of file + timeout-minutes: 5 diff --git a/.github/workflows/push_javascript.yml b/.github/workflows/javascript.yml similarity index 71% rename from .github/workflows/push_javascript.yml rename to .github/workflows/javascript.yml index ceef8f4..66acca4 100644 --- a/.github/workflows/push_javascript.yml +++ b/.github/workflows/javascript.yml @@ -2,18 +2,23 @@ name: Test for JavaScript implementations on: push: branches: [main] + pull_request: + branches: [main] jobs: test: name: Run test - runs-on: ubuntu-22.04 + runs-on: self-hosted + container: + image: buildpack-deps:jammy defaults: run: working-directory: ./test steps: - name: Install Bun - run: curl -fsSL https://bun.sh/install | bash - working-directory: ./ + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest - uses: actions/checkout@v4 with: submodules: true @@ -21,7 +26,7 @@ jobs: run: gcc -o test_maker test_maker.c - name: Build object program - run: $BUN_INSTALL/bin/bun build hd.js --compile --outfile hd + run: bun build hd.js --compile --outfile hd working-directory: ./hd/javascript - name: Build host program run: ./test_maker .test/hd.test diff --git a/.github/workflows/pr_c.yml b/.github/workflows/pr_c.yml deleted file mode 100644 index 7c69913..0000000 --- a/.github/workflows/pr_c.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Test for C implementations -on: - pull_request: - branches: [main] - -jobs: - prepare: - name: Prepare test - runs-on: self-hosted - defaults: - run: - working-directory: ./test - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Build test maker - run: gcc -o test_maker test_maker.c - - test-btn: - name: Run buntang test - runs-on: self-hosted - needs: prepare - defaults: - run: - working-directory: ./test - steps: - - name: Build object program - run: make all - working-directory: ./btn/c - - name: Build host program - run: ./test_maker .test/btn.test - - name: Run test - run: ./test ../btn/c/btn - timeout-minutes: 5 - - test-hd: - name: Run heading test - runs-on: self-hosted - needs: prepare - defaults: - run: - working-directory: ./test - steps: - - name: Build object program - run: make all - working-directory: ./hd/c - - name: Build host program - run: ./test_maker .test/hd.test - - name: Run test - run: ./test ../hd/c/hd - timeout-minutes: 5 - - test-nsy: - name: Run noisy test - runs-on: self-hosted - needs: prepare - defaults: - run: - working-directory: ./test - steps: - - name: Build object program - run: make all - working-directory: ./nsy/c - - name: Build host program - run: ./test_maker .test/nsy.test - - name: Run test - run: ./test ../nsy/c/nsy - timeout-minutes: 5 diff --git a/.github/workflows/pr_cpp.yml b/.github/workflows/pr_cpp.yml deleted file mode 100644 index 6c13bfd..0000000 --- a/.github/workflows/pr_cpp.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Test for C++ implementations -on: - pull_request: - branches: [main] - -jobs: - prepare: - name: Prepare test - runs-on: self-hosted - defaults: - run: - working-directory: ./test - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Build test maker - run: gcc -o test_maker test_maker.c - - test-hd: - name: Run heading test - runs-on: self-hosted - needs: prepare - defaults: - run: - working-directory: ./test - steps: - - name: Build object program - run: make all - working-directory: ./hd/cpp - - name: Build host program - run: ./test_maker .test/hd.test - - name: Run test - run: ./test ../hd/cpp/hd - timeout-minutes: 5 diff --git a/.github/workflows/pr_haskell.yml b/.github/workflows/pr_haskell.yml deleted file mode 100644 index 9f79c74..0000000 --- a/.github/workflows/pr_haskell.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Test for Haskell implementations -on: - pull_request: - branches: [main] - -jobs: - prepare: - name: Prepare test - runs-on: self-hosted - defaults: - run: - working-directory: ./test - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Build test maker - run: gcc -o test_maker test_maker.c - - test-btn: - name: Run buntang test - runs-on: self-hosted - needs: prepare - defaults: - run: - working-directory: ./test - steps: - - name: Build object program - run: ghc btn.hs - working-directory: ./btn/haskell - - name: Build host program - run: ./test_maker .test/btn.test - - name: Run test - run: ./test ../btn/haskell/btn - timeout-minutes: 5 - - test-hd: - name: Run heading test - runs-on: self-hosted - needs: prepare - defaults: - run: - working-directory: ./test - steps: - - name: Build object program - run: ghc hd.hs - working-directory: ./hd/haskell - - name: Build host program - run: ./test_maker .test/hd.test - - name: Run test - run: ./test ../hd/haskell/hd - timeout-minutes: 5 - - test-nsy: - name: Run noisy test - runs-on: self-hosted - needs: prepare - defaults: - run: - working-directory: ./test - steps: - - name: Build object program - run: ghc nsy.hs - working-directory: ./nsy/haskell - - name: Build host program - run: ./test_maker .test/nsy.test - - name: Run test - run: ./test ../nsy/haskell/nsy - timeout-minutes: 5 diff --git a/.github/workflows/pr_javascript.yml b/.github/workflows/pr_javascript.yml deleted file mode 100644 index 022a36c..0000000 --- a/.github/workflows/pr_javascript.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Test for JavaScript implementations -on: - pull_request: - branches: [main] - -jobs: - prepare: - name: Prepare test - runs-on: self-hosted - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Build test maker - run: gcc -o test_maker test_maker.c - working-directory: ./test - - test: - name: Run heading test - runs-on: self-hosted - needs: prepare - defaults: - run: - working-directory: ./test - steps: - - name: Build object program - run: $BUN_INSTALL/bin/bun build hd.js --compile --outfile hd - working-directory: ./hd/javascript - - name: Build host program - run: ./test_maker .test/hd.test - - name: Run test - run: ./test ../hd/javascript/hd - timeout-minutes: 5 diff --git a/.github/workflows/pr_python.yml b/.github/workflows/pr_python.yml deleted file mode 100644 index 1534fda..0000000 --- a/.github/workflows/pr_python.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Test for Python implementations -on: - pull_request: - branches: [main] - -jobs: - prepare: - name: Prepare test - runs-on: self-hosted - defaults: - run: - working-directory: ./test - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Build test maker - run: gcc -o test_maker test_maker.c - - test-btn: - name: Run buntang test - runs-on: self-hosted - needs: prepare - defaults: - run: - working-directory: ./test - steps: - - name: Build host program - run: ./test_maker .test/btn.test - - name: Run test - run: ./test "python3 ../btn/python/btn.py" - timeout-minutes: 5 - - test-nsy: - name: Run noisy test - runs-on: self-hosted - needs: prepare - defaults: - run: - working-directory: ./test - steps: - - name: Build host program - run: ./test_maker .test/nsy.test - - name: Run test - run: ./test "python3 ../nsy/python/nsy.py" - timeout-minutes: 5 diff --git a/.github/workflows/pr_rust.yml b/.github/workflows/pr_rust.yml deleted file mode 100644 index babe496..0000000 --- a/.github/workflows/pr_rust.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Test for Rust implementations -on: - pull_request: - branches: [main] - -jobs: - prepare: - name: Prepare test - runs-on: self-hosted - defaults: - run: - working-directory: ./test - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Build test maker - run: gcc -o test_maker test_maker.c - - test: - name: Run heading test - runs-on: self-hosted - needs: prepare - defaults: - run: - working-directory: ./test - steps: - - name: Build object program - run: rustc hd.rs -C debuginfo=0 -C opt-level=z -C strip=symbols -o hd - working-directory: ./hd/rust - - name: Build host program - run: ./test_maker .test/hd.test - - name: Run test - run: ./test ../hd/rust/hd - timeout-minutes: 5 diff --git a/.github/workflows/push_python.yml b/.github/workflows/python.yml similarity index 85% rename from .github/workflows/push_python.yml rename to .github/workflows/python.yml index d50dc03..f587328 100644 --- a/.github/workflows/push_python.yml +++ b/.github/workflows/python.yml @@ -2,11 +2,15 @@ name: Test for Python implementations on: push: branches: [main] + pull_request: + branches: [main] jobs: test: name: Run test - runs-on: ubuntu-22.04 + runs-on: self-hosted + container: + image: buildpack-deps:jammy defaults: run: working-directory: ./test diff --git a/.github/workflows/push_rust.yml b/.github/workflows/rust.yml similarity index 86% rename from .github/workflows/push_rust.yml rename to .github/workflows/rust.yml index 0673592..805c813 100644 --- a/.github/workflows/push_rust.yml +++ b/.github/workflows/rust.yml @@ -2,11 +2,15 @@ name: Test for Rust implementations on: push: branches: [main] + pull_request: + branches: [main] jobs: test: name: Run test - runs-on: ubuntu-22.04 + runs-on: self-hosted + container: + image: buildpack-deps:jammy defaults: run: working-directory: ./test