Build and run traversal #102
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and run traversal | |
| on: | |
| push: | |
| branches: | |
| - master | |
| schedule: | |
| - cron: '0 18 * * *' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| checks: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up C++ environment and dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install -y g++ gdb make cmake curl libcurl4-openssl-dev libcurlpp-dev nlohmann-json3-dev | |
| - name: Compile traversal | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -DCMAKE_BUILD_TYPE=Release .. | |
| make traversal | |
| - name: Run traversal | |
| shell: bash | |
| env: | |
| WIKITOKEN: ${{ secrets.WIKITOKEN }} | |
| run: | | |
| ./build/traversal | |
| - name: Setup tmate session | |
| if: ${{ failure() }} | |
| uses: mxschmitt/action-tmate@v3 | |
| timeout-minutes: 30 | |
| with: | |
| limit-access-to-actor: true | |
| - name: Upload to R2 | |
| uses: ryand56/r2-upload-action@latest | |
| with: | |
| r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | |
| r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| r2-bucket: ${{ vars.R2_BUCKET }} | |
| source-dir: output/ | |
| destination-dir: ./ |