summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-05-19 09:37:00 +0800
committerGitHub <[email protected]>2021-05-19 09:37:00 +0800
commit16a421fdcae87814b8ca5fbb53c63ddfcd688380 (patch)
tree7ebed040cd7a4fc5f9b250731b8ffc4ba4a3f058
parent376b206b27edafec967e965ffd72f220f604e609 (diff)
parentfb789657a2b0512eac5a09531288f2d5130c5a48 (diff)
Merge pull request #1416 from xmake-io/archlinux
add archlinux ci
-rw-r--r--.github/workflows/archlinux.yml36
-rw-r--r--.github/workflows/fedora.yml2
-rw-r--r--CHANGELOG.md8
-rw-r--r--xmake/core/base/scheduler.lua2
-rw-r--r--xmake/modules/package/tools/autoconf.lua6
-rw-r--r--xmake/modules/private/async/runjobs.lua13
6 files changed, 63 insertions, 4 deletions
diff --git a/.github/workflows/archlinux.yml b/.github/workflows/archlinux.yml
new file mode 100644
index 000000000..04284b89c
--- /dev/null
+++ b/.github/workflows/archlinux.yml
@@ -0,0 +1,36 @@
+name: Archlinux
+
+on:
+ pull_request:
+ push:
+ release:
+ types: [published]
+
+jobs:
+ build:
+
+ container: archlinux:latest
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: prepare build tools
+ run: |
+ pacman -Sy --noconfirm --needed git base-devel perl make unzip
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+ - name: prepare local xmake
+ run: |
+ cp -rf . ../xmake-source
+ - uses: xmake-io/github-action-setup-xmake@v1
+ with:
+ xmake-version: local#../xmake-source
+
+ # tests
+ - name: tests
+ env:
+ XMAKE_ROOT: y
+ run: |
+ xmake lua -v -D tests/run.lua
+ xrepo --version
+
diff --git a/.github/workflows/fedora.yml b/.github/workflows/fedora.yml
index 482450470..e4a932c80 100644
--- a/.github/workflows/fedora.yml
+++ b/.github/workflows/fedora.yml
@@ -29,8 +29,6 @@ jobs:
- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: local#../xmake-source
- - uses: little-core-labs/[email protected]
- id: tagName
# tests
- name: tests
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8121f302f..d18f46f47 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
## master (unreleased)
+### Bugs fixed
+
+* [#1413](https://github.com/xmake-io/xmake/issues/1413): Fix hangs on fetching packages
+
## v2.5.4
### New features
@@ -992,6 +996,10 @@
## master (开发中)
+### Bugs 修复
+
+* [#1413](https://github.com/xmake-io/xmake/issues/1413): 修复查找包过程中出现的挂起卡死问题
+
## v2.5.4
### 新特性
diff --git a/xmake/core/base/scheduler.lua b/xmake/core/base/scheduler.lua
index c33b5c7f0..1165538d7 100644
--- a/xmake/core/base/scheduler.lua
+++ b/xmake/core/base/scheduler.lua
@@ -273,7 +273,7 @@ function scheduler:_co_curenvs_update(envs)
-- get running coroutine
local running = self:co_running()
- if not running or not running:is_isolated() then
+ if not running then
return
end
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua
index 768ee20db..4536580ae 100644
--- a/xmake/modules/package/tools/autoconf.lua
+++ b/xmake/modules/package/tools/autoconf.lua
@@ -139,6 +139,7 @@ function buildenvs(package, opt)
local asflags = table.copy(table.wrap(package:build_getenv("asflags")))
local ldflags = table.copy(table.wrap(package:build_getenv("ldflags")))
local shflags = table.copy(table.wrap(package:build_getenv("shflags")))
+ local arflags = table.copy(table.wrap(package:build_getenv("arflags")))
local defines = package:build_getenv("defines")
local includedirs = package:build_getenv("includedirs")
local sysincludedirs = package:build_getenv("sysincludedirs")
@@ -177,7 +178,7 @@ function buildenvs(package, opt)
envs.CFLAGS = table.concat(cflags, ' ')
envs.CXXFLAGS = table.concat(cxxflags, ' ')
envs.ASFLAGS = table.concat(asflags, ' ')
- envs.ARFLAGS = table.concat(table.wrap(package:build_getenv("arflags")), ' ')
+ envs.ARFLAGS = table.concat(arflags, ' ')
envs.LDFLAGS = table.concat(ldflags, ' ')
envs.SHFLAGS = table.concat(shflags, ' ')
if package:is_plat("mingw") then
@@ -204,6 +205,9 @@ function buildenvs(package, opt)
elseif package:is_plat("cross") then
-- only for cross-toolchain
envs.CXX = package:build_getenv("cxx")
+ if not envs.ARFLAGS or envs.ARFLAGS == "" then
+ envs.ARFLAGS = "-cr"
+ end
end
end
local ACLOCAL_PATH = {}
diff --git a/xmake/modules/private/async/runjobs.lua b/xmake/modules/private/async/runjobs.lua
index 487d11798..ed007291c 100644
--- a/xmake/modules/private/async/runjobs.lua
+++ b/xmake/modules/private/async/runjobs.lua
@@ -73,6 +73,14 @@ function main(name, jobs, opt)
progress_helper = progress.new(nil, opt)
end
+ -- isolate environments
+ local is_isolated = false
+ local co_running = scheduler.co_running()
+ if co_running and opt.isolate then
+ is_isolated = co_running:is_isolated()
+ co_running:isolate(true)
+ end
+
-- run timer
local stop = false
local running_jobs_indices = {}
@@ -235,6 +243,11 @@ function main(name, jobs, opt)
-- wait all jobs exited
scheduler.co_group_wait(group_name)
+ -- restore isolated environments
+ if co_running and opt.isolate then
+ co_running:isolate(is_isolated)
+ end
+
-- stop timer
stop = true