Skip to content

Commit

Permalink
Adds support for Windows (#762)
Browse files Browse the repository at this point in the history
* support for WereSoCool on Windows
* update portaudio to use cc
* update bumper_cool to bump deps
* Update cool_tests and cd to add caching and windows tests
* Delete unused files and add platform specific audio files
* Update license and readmes
* Update settings to check env
* Rehash for 48_000
  • Loading branch information
xasopheno authored Nov 16, 2022
1 parent c8a85c4 commit ad66161
Show file tree
Hide file tree
Showing 196 changed files with 90,216 additions and 13,593 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV

- name: install macos dependancies
run: brew install portaudio pkg-config lame libvorbis just
run: brew install lame libvorbis just
- name: Installing Rust toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -35,11 +35,14 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
# ref: ${{ github.event.pull_request.head.ref }}
# ref: ${{ github.ref_name }}
token: ${{ env.GH_TOKEN }}
ref: 'main'

- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
key: "weresocool-cd"

- name: Install publish-cool-workspace
uses: baptiste0928/cargo-install@v1
with:
Expand Down
55 changes: 46 additions & 9 deletions .github/workflows/cool_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ jobs:
sudo apt update
- name: install dependancies
run: |
sudo apt install -y libasound2-dev portaudio19-dev libportaudio2 libportaudiocpp0 pkg-config lame libmp3lame-dev vorbis-tools lld just
- uses: Swatinem/rust-cache@v2
sudo apt install -y libasound2-dev lame libmp3lame-dev vorbis-tools lld just
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
key: "weresocool-lint"

- uses: actions-rs/toolchain@v1
with:
Expand All @@ -37,17 +40,24 @@ jobs:
curl -q 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
echo "deb [signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list
sudo apt update
- name: setup dummy soundcard
run: sudo echo "pcm.!default { type plug slave.pcm 'null' }" > $HOME/.asoundrc
# - name: setup dummy soundcard
# run: |
# sudo echo "pcm.!default { type plug slave.pcm 'null' }" > $HOME/.asoundrc
- name: install dependancies
run: |
sudo apt install -y libasound2-dev portaudio19-dev libportaudio2 libportaudiocpp0 pkg-config lame libmp3lame-dev vorbis-tools lld pulseaudio just
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
sudo apt install -y libasound2-dev lame libmp3lame-dev vorbis-tools lld pulseaudio just
- name: start pulseaudio daemon
run: |
pulseaudio -D --exit-idle-time=-1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
key: "weresocool-ubuntu"
- name: run tests
run: just test

Expand All @@ -56,12 +66,39 @@ jobs:

steps:
- name: install dependancies
run: brew install portaudio pkg-config lame libvorbis just
run: brew install lame libvorbis just
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
key: "weresocool-windows"
- name: run tests
run: just test

windows:
runs-on: windows-latest
steps:
- name: start audiosrv
run: net start audiosrv
- name: install scream
run: |
Invoke-WebRequest https://github.com/duncanthrax/scream/releases/download/3.8/Scream3.8.zip -OutFile Scream3.8.zip
Expand-Archive -Path Scream3.8.zip -DestinationPath Scream
Import-Certificate -FilePath Scream\Install\driver\x64\Scream.cat -CertStoreLocation Cert:\LocalMachine\TrustedPublisher
Scream\Install\helpers\devcon-x64.exe install Scream\Install\driver\x64\Scream.inf *Scream
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
key: "weresocool-windows"
- name: run tests
run: cargo test --release
Loading

0 comments on commit ad66161

Please sign in to comment.