Repository navigation
fix Windows getchr hang: drain termPeeked before _getch #47
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: Linux | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ['[0-9]+.[0-9]+.[0-9]+'] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-22.04 | |
| artifact: 3code-linux-amd64 | |
| ext: tar.gz | |
| - os: ubuntu-22.04-arm | |
| artifact: 3code-linux-arm64 | |
| ext: tar.gz | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: jiro4989/setup-nim-action@v2 | |
| with: | |
| nim-version: stable | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install dependencies | |
| run: nimble install -y --depsOnly | |
| - name: Compute build flags | |
| run: | | |
| if [[ "${GITHUB_REF}" == refs/tags/* ]]; then | |
| # autoupdate on releases only | |
| echo "BUILD_FLAGS=-d:autoUpdate" >> "$GITHUB_ENV" | |
| fi | |
| - name: Build | |
| run: nimble build -y -d:release ${{ env.BUILD_FLAGS }} | |
| - name: Run tests | |
| run: nimble test | |
| timeout-minutes: 20 | |
| - name: Package | |
| run: | | |
| mkdir -p ${{ matrix.artifact }} | |
| cp 3code ${{ matrix.artifact }}/ | |
| cp README.md LICENSE ${{ matrix.artifact }}/ | |
| tar czf ${{ matrix.artifact }}.${{ matrix.ext }} ${{ matrix.artifact }} | |
| - name: Upload artifact (GitHub Actions) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ${{ matrix.artifact }}.${{ matrix.ext }} | |
| - name: Upload artifact to 3code.capocasa.dev | |
| if: github.ref == 'refs/heads/main' | |
| continue-on-error: true | |
| run: | | |
| curl -f -H "Authorization: Bearer ${{ secrets.RELEASE_SECRET }}" -F "file=${{ matrix.artifact }}.${{ matrix.ext }}" \ | |
| https://3code.capocasa.dev/main/upload.nim | |