Skip to content

Commit c38ca5f

Browse files
authored
add macos to CI (#29)
1 parent a232f15 commit c38ca5f

8 files changed

Lines changed: 83 additions & 63 deletions

File tree

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,34 @@ Your karaoke collection can be browsed and queued from a self served website and
2020

2121
- [Setup](#setup)
2222
- [Linux](#linux)
23+
- [macOS](#macos)
2324
- [Windows](#windows)
2425
- [Build from Source](#build-from-source)
2526
- [CLI Arguments](#cli-arguments)
2627
- [Screenshots](#screenshots)
2728
- [Songs Page](#songs-page)
29+
- [Favorites Page](#favorites-page)
2830
- [Artists Page](#artists-page)
2931
- [Queue Page](#queue-page)
3032
- [Player](#player)
3133
- [Acknowledgments](#acknowledgments)
3234

3335
## Setup
3436
### Linux
35-
- Download latest release binary or build from source
37+
- Download latest [release](https://github.com/tarkah/karaoke-rs/releases/latest) or build from source
3638
- Run `karaoke-rs --help` to see all arguments
3739
- Place your song collection at `~/.local/share/karaoke-rs/songs`, or specify location via `--songs path/to/song/directory`
3840
- Default configuration file is created at `~/.config/karaoke-rs/config.yaml`. This can be copied / changed and specified via `--config path/to/config.yaml`
3941
- You may need to force disable vsync to eliminate flickering, set environment variable `vblank_mode=0`
4042

43+
### macOS
44+
- Download latest [release](https://github.com/tarkah/karaoke-rs/releases/latest) or build from source
45+
- Run `karaoke-rs --help` to see all arguments
46+
- Place your song collection at `$HOME/Library/Application Support/karaoke-rs/songs`, or specify location via `--songs path/to/song/directory`
47+
- Default configuration file is created at `$HOME/Library/Preferences/karaoke-rs/config.yaml`. This can be copied / changed and specified via `--config path/to/config.yaml`
48+
4149
### Windows
42-
- Download latest release binary or build from source
50+
- Download latest [release](https://github.com/tarkah/karaoke-rs/releases/latest) or build from source
4351
- Double click `karaoke-rs.exe` to run with default configuration. Run from command prompt / powershell `karaoke-rs.exe --help` to see all arguments
4452
- Place your song collection at `%APPDATA%\karaoke-rs\songs`, or specify location via `--songs C:\path\to\song\directory`
4553
- Default configuration file is created at `%APPDATA%\karaoke-rs\config.yaml`. This can be copied / changed and specified via `--config C:\path\to\config.yaml`
@@ -90,6 +98,9 @@ OPTIONS:
9098
### Songs Page
9199
![songs](/screenshots/songs.png?raw=true)
92100

101+
### Favorites Page
102+
![favorites](/screenshots/favorites.png?raw=true)
103+
93104
### Artists Page
94105
![artists](/screenshots/artists.png?raw=true)
95106

azure-pipelines.yml

Lines changed: 70 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
trigger:
22
branches:
3-
include: ['master', 'azure-pipelines']
3+
include: ["master", "azure-pipelines"]
44
tags:
5-
include: ['*']
5+
include: ["*"]
66

77
variables:
88
rust_test_threads: 1
99

1010
jobs:
11-
- job: 'Frontend'
11+
- job: "Frontend"
1212
pool:
13-
vmImage: 'ubuntu-latest'
13+
vmImage: "ubuntu-latest"
1414
steps:
1515
- script: |
1616
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
@@ -25,16 +25,19 @@ jobs:
2525
- publish: $(System.DefaultWorkingDirectory)/frontend
2626
artifact: frontend
2727

28-
- job: 'Clippy'
29-
dependsOn: 'Frontend'
28+
- job: "Clippy"
29+
dependsOn: "Frontend"
3030
condition: not(startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
3131
strategy:
3232
matrix:
3333
windows-stable:
34-
imageName: 'windows-latest'
34+
imageName: "windows-latest"
3535
rustup_toolchain: stable
3636
linux-stable:
37-
imageName: 'ubuntu-latest'
37+
imageName: "ubuntu-latest"
38+
rustup_toolchain: stable
39+
macos-stable:
40+
imageName: "macOS-latest"
3841
rustup_toolchain: stable
3942

4043
pool:
@@ -49,7 +52,7 @@ jobs:
4952
- script: |
5053
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
5154
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
52-
displayName: Linux Install Rust
55+
displayName: Linux Darwin Install Rust
5356
condition: ne( variables['Agent.OS'], 'Windows_NT' )
5457
- script: |
5558
curl -sSf -o rustup-init.exe https://win.rustup.rs
@@ -64,29 +67,31 @@ jobs:
6467
- task: CopyFiles@2
6568
displayName: Copy frontend dist folder
6669
inputs:
67-
sourceFolder: '$(Pipeline.Workspace)/frontend/dist'
68-
contents: '**'
69-
targetFolder: '$(System.DefaultWorkingDirectory)/frontend/dist'
70+
sourceFolder: "$(Pipeline.Workspace)/frontend/dist"
71+
contents: "**"
72+
targetFolder: "$(System.DefaultWorkingDirectory)/frontend/dist"
7073

7174
- script: rustup component add clippy
7275
displayName: Install Clippy
7376
- script: cargo clippy
7477
displayName: Run Clippy
7578

76-
77-
- job: 'Test'
78-
dependsOn: 'Frontend'
79+
- job: "Test"
80+
dependsOn: "Frontend"
7981
condition: not(startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
8082
strategy:
8183
matrix:
8284
windows-stable:
83-
imageName: 'windows-latest'
85+
imageName: "windows-latest"
8486
rustup_toolchain: stable
85-
target: 'x86_64-pc-windows-msvc'
87+
target: "x86_64-pc-windows-msvc"
8688
linux-stable:
87-
imageName: 'ubuntu-latest'
89+
imageName: "ubuntu-latest"
90+
rustup_toolchain: stable
91+
target: "x86_64-unknown-linux-gnu"
92+
macos-stable:
93+
imageName: "macOS-latest"
8894
rustup_toolchain: stable
89-
target: 'x86_64-unknown-linux-gnu'
9095

9196
pool:
9297
vmImage: $(imageName)
@@ -100,7 +105,7 @@ jobs:
100105
- script: |
101106
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
102107
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
103-
displayName: Linux Install Rust
108+
displayName: Linux Darwin Install Rust
104109
condition: ne( variables['Agent.OS'], 'Windows_NT' )
105110
- script: |
106111
curl -sSf -o rustup-init.exe https://win.rustup.rs
@@ -115,41 +120,45 @@ jobs:
115120
- task: CopyFiles@2
116121
displayName: Copy frontend dist folder
117122
inputs:
118-
sourceFolder: '$(Pipeline.Workspace)/frontend/dist'
119-
contents: '**'
120-
targetFolder: '$(System.DefaultWorkingDirectory)/frontend/dist'
123+
sourceFolder: "$(Pipeline.Workspace)/frontend/dist"
124+
contents: "**"
125+
targetFolder: "$(System.DefaultWorkingDirectory)/frontend/dist"
121126

122127
- script: cargo build
123128
displayName: Cargo Build
124129
- script: cargo test
125130
displayName: Cargo Test
126131

127-
128-
- job: 'Release'
129-
dependsOn: 'Frontend'
132+
- job: "Release"
133+
dependsOn: "Frontend"
130134
timeoutInMinutes: 0
131135
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
132136
strategy:
133137
matrix:
134138
windows-stable:
135-
imageName: 'windows-latest'
139+
imageName: "windows-latest"
136140
rustup_toolchain: stable
137-
target: 'x86_64-pc-windows-msvc'
141+
target: "x86_64-pc-windows-msvc"
138142
docker: false
139143
linux-stable:
140-
imageName: 'ubuntu-latest'
144+
imageName: "ubuntu-latest"
145+
rustup_toolchain: stable
146+
target: "x86_64-unknown-linux-gnu"
147+
docker: false
148+
macos-stable:
149+
imageName: "macOS-latest"
141150
rustup_toolchain: stable
142-
target: 'x86_64-unknown-linux-gnu'
151+
target: "x86_64-apple-darwin"
143152
docker: false
144153
armv7-stable:
145-
imageName: 'ubuntu-latest'
154+
imageName: "ubuntu-latest"
146155
rustup_toolchain: stable
147-
target: 'armv7-unknown-linux-gnueabihf'
156+
target: "armv7-unknown-linux-gnueabihf"
148157
docker: true
149158
aarch64-stable:
150-
imageName: 'ubuntu-latest'
159+
imageName: "ubuntu-latest"
151160
rustup_toolchain: stable
152-
target: 'aarch64-unknown-linux-gnu'
161+
target: "aarch64-unknown-linux-gnu"
153162
docker: true
154163

155164
pool:
@@ -175,7 +184,7 @@ jobs:
175184
- script: |
176185
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain $RUSTUP_TOOLCHAIN
177186
echo "##vso[task.setvariable variable=PATH;]$PATH:$HOME/.cargo/bin"
178-
displayName: Linux Install Rust
187+
displayName: Linux Darwin Install Rust
179188
condition: and( ne( variables['Agent.OS'], 'Windows_NT' ), eq( variables['docker'], 'false' ))
180189
- script: |
181190
curl -sSf -o rustup-init.exe https://win.rustup.rs
@@ -190,9 +199,9 @@ jobs:
190199
- task: CopyFiles@2
191200
displayName: Copy frontend dist folder
192201
inputs:
193-
sourceFolder: '$(Pipeline.Workspace)/frontend/dist'
194-
contents: '**'
195-
targetFolder: '$(System.DefaultWorkingDirectory)/frontend/dist'
202+
sourceFolder: "$(Pipeline.Workspace)/frontend/dist"
203+
contents: "**"
204+
targetFolder: "$(System.DefaultWorkingDirectory)/frontend/dist"
196205

197206
- script: cargo build --release
198207
displayName: Cargo Build
@@ -202,59 +211,59 @@ jobs:
202211
condition: eq( variables['docker'], 'false' )
203212

204213
- script: |
205-
docker build -t tarkah/karaoke-rs:$TARGET ./ci/$TARGET/
214+
docker build -t tarkah/karaoke-rs:$TARGET ./ci/$TARGET/
206215
displayName: Cross Setup Docker
207216
condition: eq( variables['docker'], 'true' )
208217
- script: |
209-
docker run -v "$(pwd):/source" tarkah/karaoke-rs:$TARGET cargo build --release --manifest-path /source/Cargo.toml --target $TARGET
218+
docker run -v "$(pwd):/source" tarkah/karaoke-rs:$TARGET cargo build --release --manifest-path /source/Cargo.toml --target $TARGET
210219
displayName: Cross Build
211220
condition: eq( variables['docker'], 'true' )
212221
213222
- task: CopyFiles@2
214223
displayName: Copy Binary
215224
inputs:
216-
sourceFolder: '$(Build.SourcesDirectory)'
225+
sourceFolder: "$(Build.SourcesDirectory)"
217226
contents: |
218227
target/**/release/?(karaoke-rs|karaoke-rs.exe)
219-
targetFolder: '$(Build.BinariesDirectory)/karaoke-rs'
228+
targetFolder: "$(Build.BinariesDirectory)/karaoke-rs"
220229
flattenFolders: true
221230
- task: CopyFiles@2
222231
displayName: Copy Assets
223232
inputs:
224-
sourceFolder: '$(Build.SourcesDirectory)'
233+
sourceFolder: "$(Build.SourcesDirectory)"
225234
contents: |
226235
README.md
227236
LICENSE
228237
screenshots/**.*
229-
targetFolder: '$(Build.BinariesDirectory)/karaoke-rs'
238+
targetFolder: "$(Build.BinariesDirectory)/karaoke-rs"
230239

231240
- task: ArchiveFiles@2
232-
displayName: Linux Archive
241+
displayName: Linux Darwin Archive
233242
inputs:
234-
rootFolderOrFile: '$(Build.BinariesDirectory)/karaoke-rs'
235-
archiveType: 'tar'
236-
tarCompression: 'gz'
237-
archiveFile: '$(Build.ArtifactStagingDirectory)/karaoke-rs-$(build.my_tag)-$(TARGET).tar.gz'
243+
rootFolderOrFile: "$(Build.BinariesDirectory)/karaoke-rs"
244+
archiveType: "tar"
245+
tarCompression: "gz"
246+
archiveFile: "$(Build.ArtifactStagingDirectory)/karaoke-rs-$(build.my_tag)-$(TARGET).tar.gz"
238247
condition: ne( variables['Agent.OS'], 'Windows_NT' )
239248
- task: ArchiveFiles@2
240249
displayName: Windows Archive
241250
inputs:
242-
rootFolderOrFile: '$(Build.BinariesDirectory)/karaoke-rs'
243-
archiveType: 'zip'
244-
archiveFile: '$(Build.ArtifactStagingDirectory)/karaoke-rs-$(build.my_tag)-$(TARGET).zip'
251+
rootFolderOrFile: "$(Build.BinariesDirectory)/karaoke-rs"
252+
archiveType: "zip"
253+
archiveFile: "$(Build.ArtifactStagingDirectory)/karaoke-rs-$(build.my_tag)-$(TARGET).zip"
245254
condition: eq( variables['Agent.OS'], 'Windows_NT' )
246255

247256
- task: GithubRelease@0
248257
displayName: Publish Assets to Github Release
249258
condition: succeeded()
250259
inputs:
251-
gitHubConnection: 'tarkah'
252-
repositoryName: 'tarkah/karaoke-rs'
253-
action: 'edit'
254-
target: '$(build.sourceVersion)'
255-
tagSource: 'manual'
256-
tag: '$(build.my_tag)'
257-
assets: '$(Build.ArtifactStagingDirectory)/*'
258-
title: '$(build.my_tag) - $(build.date)'
259-
assetUploadMode: 'replace'
260+
gitHubConnection: "tarkah"
261+
repositoryName: "tarkah/karaoke-rs"
262+
action: "edit"
263+
target: "$(build.sourceVersion)"
264+
tagSource: "manual"
265+
tag: "$(build.my_tag)"
266+
assets: "$(Build.ArtifactStagingDirectory)/*"
267+
title: "$(build.my_tag) - $(build.date)"
268+
assetUploadMode: "replace"
260269
addChangeLog: false

screenshots/artists.png

-60.9 KB
Loading

screenshots/favorites.png

154 KB
Loading

screenshots/player_1.png

100755100644
44 KB
Loading

screenshots/player_2.png

100755100644
19.9 KB
Loading

screenshots/queue.png

-47.8 KB
Loading

screenshots/songs.png

-81.2 KB
Loading

0 commit comments

Comments
 (0)