From 5a5010552a53e14a3e3c3d9f9df49d4c9110d309 Mon Sep 17 00:00:00 2001 From: dekken Date: Sat, 28 Oct 2023 13:46:01 +0200 Subject: [PATCH] O2 mac + arm mac --- .github/workflows/build_osx.yml | 2 +- .github/workflows/build_osx_arm.yml.off | 35 +++++++++++++++++++++++++ .github/workflows/build_win.yml | 2 +- .github/workflows/release.yml | 27 ++++++++++++------- 4 files changed, 55 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/build_osx_arm.yml.off diff --git a/.github/workflows/build_osx.yml b/.github/workflows/build_osx.yml index 576c6a82..a330f90c 100644 --- a/.github/workflows/build_osx.yml +++ b/.github/workflows/build_osx.yml @@ -19,7 +19,7 @@ jobs: run: | mkdir ~/.maiken cp res/mkn/clang.yml ~/.maiken/settings.yaml - KLOG=3 ./mkn build -dtKOW 9 -g 0 + KLOG=3 ./mkn build -dtKO 2 -W 9 -g 0 KLOG=3 ./mkn build -dtOp test_mod KLOG=3 ./mkn build test pack -Op test diff --git a/.github/workflows/build_osx_arm.yml.off b/.github/workflows/build_osx_arm.yml.off new file mode 100644 index 00000000..5089c107 --- /dev/null +++ b/.github/workflows/build_osx_arm.yml.off @@ -0,0 +1,35 @@ + +name: macos-arm + +on: + pull_request: + branches: [ master ] + +env: + KLOG: 3 + +jobs: + build: + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + + - run: make bsd + - run: brew install ccache + + - env: + MKN_LIB_LINK_LIB: 1 + KUL_GIT_CO: --depth 1 + run: | + mkdir ~/.maiken + cp res/mkn/clang.yml ~/.maiken/settings.yaml + ./mkn build -dtKO 2 -W 9 -g 0 + ./mkn build -dtOp test_mod + ./mkn build test pack -Op test + + - uses: actions/upload-artifact@v3 + env: + KUL_GIT_CO: --depth 10 + with: + name: mkn + path: bin/build/mkn diff --git a/.github/workflows/build_win.yml b/.github/workflows/build_win.yml index 89d2f36f..75f7031a 100644 --- a/.github/workflows/build_win.yml +++ b/.github/workflows/build_win.yml @@ -22,7 +22,7 @@ jobs: KUL_GIT_CO: --depth 1 run: | bash -c ./res/ci/win_build.sh - mkn build -dtKOg 0 -a "-std:c++17 -EHsc" + mkn build -dtKO 2 -g 0 -a "-std:c++17 -EHsc" mkn build -dtOp test_mod -a "-std:c++17 -EHsc" mkn build test pack -Op test -a "-std:c++17 -EHsc" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 622f14e7..740aefbb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,14 +5,12 @@ on: workflow_dispatch: jobs: build: - # Build on Linux, Windows and MacOS strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - if: matrix.os == 'windows-latest' run: bash -c "rm /bin/link" # interferes with cl/link.exe - if: matrix.os == 'windows-latest' @@ -28,7 +26,6 @@ jobs: bash -c ./res/ci/win_build.sh mkn build -dtKOg 0 -a "-std:c++17 -EHsc" - - if: matrix.os == 'ubuntu-latest' env: MKN_GCC_PREFERRED: 1 @@ -37,14 +34,12 @@ jobs: make nix KLOG=3 ./mkn build -dtKa "-std=c++17 -fPIC" -O 2 -g 0 -W 9 -o mkn_nix - - if: matrix.os == 'macos-latest' env: KUL_GIT_CO: --depth 1 run: | make bsd - KLOG=3 ./mkn build -dtKOW 9 -g 0 -a "-std=c++17 -fPIC" -o mkn_osx - + KLOG=3 ./mkn build -dtKW 9 -O 2 -g 0 -a "-std=c++17 -fPIC" -o mkn_osx - if: matrix.os == 'ubuntu-latest' uses: actions/upload-artifact@v3 @@ -76,15 +71,28 @@ jobs: - env: MKN_GCC_PREFERRED: 1 KUL_GIT_CO: --depth 1 - run: | - KLOG=3 ./mkn build -dtKa "-std=c++17 -fPIC" -O 2 -g 0 -W 9 -o mkn_manylinux - + run: KLOG=3 ./mkn build -dtKa "-std=c++17 -fPIC" -O 2 -g 0 -W 9 -o mkn_manylinux - uses: actions/upload-artifact@v3 with: name: maiken-manylinux-latest path: bin/build/mkn_manylinux retention-days: 1 + build_arm_macos: + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + - run: make bsd + - env: + MKN_GCC_PREFERRED: 1 + KUL_GIT_CO: --depth 1 + run: KLOG=3 ./mkn build -dtKa "-std=c++17 -fPIC" -O 2 -g 0 -W 9 -o mkn_arm_osx + - uses: actions/upload-artifact@v3 + with: + name: maiken-macos-arm-latest + path: bin/build/mkn_arm_osx + retention-days: 1 + release: name: "Prelease" @@ -106,3 +114,4 @@ jobs: maiken-macos-latest/mkn_osx maiken-ubuntu-latest/mkn_nix maiken-manylinux-latest/mkn_manylinux + maiken-macos-arm-latest/mkn_arm_osx