Fix Windows slipstream: use MinGW generator + x86_64-pc-windows-gnu t… #38
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - goos: linux | |
| goarch: amd64 | |
| suffix: linux-amd64 | |
| - goos: linux | |
| goarch: arm64 | |
| suffix: linux-arm64 | |
| - goos: darwin | |
| goarch: amd64 | |
| suffix: darwin-amd64 | |
| - goos: darwin | |
| goarch: arm64 | |
| suffix: darwin-arm64 | |
| - goos: windows | |
| goarch: amd64 | |
| suffix: windows-amd64.exe | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Build | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| CGO_ENABLED: '0' | |
| run: go build -ldflags="-s -w" -o findns-${{ matrix.suffix }} ./cmd | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: findns-${{ matrix.suffix }} | |
| path: findns-${{ matrix.suffix }} | |
| build-slipstream-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout slipstream-rust | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Mygod/slipstream-rust | |
| path: slipstream-rust | |
| submodules: recursive | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install deps | |
| run: | | |
| sudo apt-get update -q | |
| sudo apt-get install -y cmake libssl-dev | |
| - name: Build | |
| working-directory: slipstream-rust | |
| env: | |
| PICOQUIC_AUTO_BUILD: '1' | |
| run: | | |
| cargo build --release -p slipstream-client --features slipstream-ffi/openssl-vendored | |
| cp target/release/slipstream-client ../slipstream-client-linux-amd64 | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: slipstream-client-linux-amd64 | |
| path: slipstream-client-linux-amd64 | |
| build-slipstream-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout slipstream-rust | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: Mygod/slipstream-rust | |
| path: slipstream-rust | |
| submodules: recursive | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-pc-windows-gnu | |
| - name: Install deps | |
| run: | | |
| choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y | |
| choco install pkgconfiglite -y | |
| choco install mingw -y | |
| - name: Pre-build picoquic with bash (MinGW) | |
| shell: bash | |
| working-directory: slipstream-rust | |
| env: | |
| PICOQUIC_BUILD_DIR: ${{ github.workspace }}/slipstream-rust/.picoquic-build | |
| CMAKE_GENERATOR: MinGW Makefiles | |
| run: | | |
| export PATH="/c/Program Files/Git/usr/bin:$PATH" | |
| bash scripts/build_picoquic.sh | |
| - name: Build slipstream-client | |
| shell: bash | |
| working-directory: slipstream-rust | |
| env: | |
| PICOQUIC_BUILD_DIR: ${{ github.workspace }}/slipstream-rust/.picoquic-build | |
| run: | | |
| export PATH="/c/Program Files/Git/usr/bin:$PATH" | |
| cargo build --release -p slipstream-client --target x86_64-pc-windows-gnu --features slipstream-ffi/openssl-vendored | |
| cp target/x86_64-pc-windows-gnu/release/slipstream-client.exe ../slipstream-client-windows-amd64.exe | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: slipstream-client-windows-amd64.exe | |
| path: slipstream-client-windows-amd64.exe | |
| release: | |
| needs: [build, build-slipstream-linux, build-slipstream-windows] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: artifacts/* | |
| generate_release_notes: true |