diff options
| -rw-r--r-- | .github/actions/setup_base/action.yml | 15 | ||||
| -rw-r--r-- | .github/workflows/ci.yml | 32 |
2 files changed, 29 insertions, 18 deletions
diff --git a/.github/actions/setup_base/action.yml b/.github/actions/setup_base/action.yml new file mode 100644 index 0000000..e530333 --- /dev/null +++ b/.github/actions/setup_base/action.yml @@ -0,0 +1,15 @@ +name: "Setup base" + +runs: + using: "composite" + steps: + - name: Install dependencies + shell: bash + run: | + pacman -Syu --noconfirm + pacman -S --noconfirm base-devel git make ninja clang llvm cmake + git clone https://github.com/ArthurSonzogni/FTXUI.git + cd FTXUI + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build + cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` + cmake --install build diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cb54ca..908a5a0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,15 +26,13 @@ jobs: container: image: archlinux steps: - - name: Install dependencies - run: | - pacman -Syu --noconfirm - pacman -S --noconfirm base-devel git make ninja gcc clang cmake - git clone https://github.com/ArthurSonzogni/FTXUI.git - cd FTXUI - cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build - cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` - cmake --install build + - name: Checkout repository actions + uses: actions/checkout@v4 + with: + sparse-checkout: .github/actions + + - name: Setup base + uses: ./.github/actions/setup_base - name: Checkout repository uses: actions/checkout@v4 @@ -95,15 +93,13 @@ jobs: container: image: archlinux steps: - - name: Install dependencies - run: | - pacman -Syu --noconfirm - pacman -S --noconfirm base-devel git make ninja clang llvm cmake - git clone https://github.com/ArthurSonzogni/FTXUI.git - cd FTXUI - cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build - cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` - cmake --install build + - name: Checkout repository actions + uses: actions/checkout@v4 + with: + sparse-checkout: .github/actions + + - name: Setup base + uses: ./.github/actions/setup_base - name: Checkout repository uses: actions/checkout@v4 |
