Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable ci on all OS #342

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ jobs:

test:
name: Test Suite
# runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
# matrix:
# os: [ ubuntu-latest, macos-latest, windows-latest ]
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
# Clean unnecessary files to save disk space
- name: clean unnecessary files to save space
if: runner.os == 'Linux'
run: |
docker rmi `docker images -q`
sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/sudo apt/sources.list.d
Expand All @@ -67,6 +67,7 @@ jobs:

# Free up disk space on Ubuntu
- name: Free Disk Space (Ubuntu)
if: runner.os == 'Linux'
uses: jlumbroso/free-disk-space@main
with:
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
Expand Down
13 changes: 8 additions & 5 deletions kaspad/src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,14 @@ pub struct Runtime {
/// This function can be used to identify the location of
/// the application folder that contains kaspad logs and the database.
pub fn get_app_dir_from_args(args: &Args) -> PathBuf {
let app_dir = args
.appdir
.clone()
.unwrap_or_else(|| get_app_dir().as_path().to_str().unwrap().to_string())
.replace('~', get_home_dir().as_path().to_str().unwrap());
let mut app_dir = args.appdir.clone().unwrap_or_else(|| get_app_dir().as_path().to_str().unwrap().to_string());

// TODO: temporary patch. Why do we do this replace for every OS in the first place?
#[cfg(any(target_os = "macos", target_os = "linux"))]
{
app_dir = app_dir.replace('~', get_home_dir().as_path().to_str().unwrap());
}

if app_dir.is_empty() {
get_app_dir()
} else {
Expand Down
Loading