Fix winsock include collision in rl-test #6
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 | |
| on: | |
| push: | |
| branches: | |
| - '*' | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| # The amiga binary is built once here; the other jobs download it so every | |
| # package contains a host controller plus the amiga target it talks to. | |
| Linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: build host | |
| run: | | |
| cmake -B build -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build -j 4 | |
| - name: test | |
| run: ctest --test-dir build --output-on-failure | |
| - name: build amiga | |
| run: | | |
| cmake -B build-amiga -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=cmake/amiga-vbcc.cmake | |
| cmake --build build-amiga -j 4 | |
| - name: package | |
| run: | | |
| mkdir -p dist | |
| cp build/rl-controller build/rl-target dist/ | |
| cp build-amiga/rl-target dist/rl-target.amiga | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: rlaunch-amiga | |
| path: build-amiga/rl-target | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: rlaunch-linux | |
| path: dist | |
| macOS: | |
| needs: Linux | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: build host | |
| run: | | |
| cmake -B build -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build -j 4 | |
| - name: test | |
| run: ctest --test-dir build --output-on-failure | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: rlaunch-amiga | |
| path: amiga | |
| - name: package | |
| run: | | |
| mkdir -p dist | |
| cp build/rl-controller build/rl-target dist/ | |
| cp amiga/rl-target dist/rl-target.amiga | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: rlaunch-macos | |
| path: dist | |
| Windows: | |
| needs: Linux | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: build host | |
| run: | | |
| cmake -B build | |
| cmake --build build --config Release | |
| - name: test | |
| run: ctest --test-dir build -C Release --output-on-failure | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: rlaunch-amiga | |
| path: amiga | |
| - name: package | |
| shell: bash | |
| run: | | |
| mkdir -p dist | |
| cp build/Release/rl-controller.exe build/Release/rl-target.exe dist/ | |
| cp amiga/rl-target dist/rl-target.amiga | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: rlaunch-windows | |
| path: dist | |
| Release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: [Linux, macOS, Windows] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: zip packages | |
| run: | | |
| cd artifacts | |
| for d in rlaunch-linux rlaunch-macos rlaunch-windows; do | |
| zip -rj "$d-${GITHUB_REF_NAME}.zip" "$d" | |
| done | |
| - name: create release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --generate-notes artifacts/*.zip |