name: ubuntu
run-name: ubuntu-test
on: [ push ]

jobs:
  Explore-Gitea-Actions:
    runs-on: ubuntu-latest
    steps:
      - name: Check out repository code
        uses: actions/checkout@v4
      - name: install depends
        run: |
          sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list.d/ubuntu.sources
          sed -i 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list.d/ubuntu.sources
          apt update
          apt install -y libmruby-dev cmake build-essential
      - name: build
        run: |
          mkdir build && cd build
          cmake ..
          cmake --build . --target mrubypp_test
          ./mrubypp_test
      - run: echo "🍏 This job's status is ${{ job.status }}."