From ff98844bab7d936c6700d599fdc08389c768880e Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 18 May 2021 22:55:31 +0800 Subject: add archlinux ci --- .github/workflows/archlinux.yml | 36 ++++++++++++++++++++++++++++++++++++ .github/workflows/fedora.yml | 2 -- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/archlinux.yml 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/get-git-tag@v3.0.2 - id: tagName # tests - name: tests -- cgit v1.3.1 From 45969bdf3890c1ee4d1614efd1eb9e9d9adc9093 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 18 May 2021 23:45:56 +0800 Subject: improve tools/autoconf --- xmake/modules/package/tools/autoconf.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 = {} -- cgit v1.3.1 From dbb5ca5a87167ac5869b71b16bb260320f231afd Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 19 May 2021 22:32:23 +0800 Subject: improve runjobs --- xmake/core/base/scheduler.lua | 2 +- xmake/modules/private/async/runjobs.lua | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) 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/private/async/runjobs.lua b/xmake/modules/private/async/runjobs.lua index 6a2964a90..7ff3b5090 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 -- cgit v1.3.1 From fb789657a2b0512eac5a09531288f2d5130c5a48 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 19 May 2021 22:36:02 +0800 Subject: update changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) 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 ### 新特性 -- cgit v1.3.1