diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 4038ba06..cb48d59f 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -2,13 +2,9 @@ name: ๐Ÿ—๏ธ Setup Environment description: Install Dependencies & Deploy Workarounds inputs: - container: + os: required: true - description: Build container used - - install-vtk: - required: true - description: Wether or not to install VTK as a system dependency + description: Operating System used runs: using: "composite" @@ -22,19 +18,9 @@ runs: - name: ๐Ÿ–ฅ๏ธ Enable MSVC Dev Console uses: ilammy/msvc-dev-cmd@v1 - - name: ๐Ÿ“‹ Install Dependencies - shell: bash - if: ${{ inputs.container == 'ubuntu-latest' }} - run: dnf install -y gcc gcc-c++ kernel-devel cmake ninja-build git docker sed clang-tools-extra - - name: ๐Ÿ“‹ Install OpenMP shell: bash if: ${{ inputs.container == 'macos-latest' }} run: | brew reinstall --build-from-source --formula ./.github/homebrew/libomp.rb echo "OpenMP_ROOT=$(brew --prefix)/opt/libomp" >> $GITHUB_ENV - - - name: ๐Ÿ“‹ Install VTK - shell: bash - if: ${{ inputs.install-vtk == 'true' }} - run: dnf install -y vtk vtk-devel diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 427b179b..cd7c97fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,20 +17,22 @@ jobs: os: - macos-latest - - ubuntu-latest - windows-latest - vtk-system: [true, false] + include: + - os: ubuntu-latest + container: ghcr.io/viennatools/vienna-builder:vtk - exclude: - - os: macos-latest - vtk-system: true - - - os: windows-latest - vtk-system: true + - os: ubuntu-latest + container: ghcr.io/viennatools/vienna-builder:stock runs-on: ${{ matrix.os }} - container: ${{ matrix.os == 'ubuntu-latest' && 'fedora:38' || null }} + + container: + image: ${{ matrix.container }} + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} name: '๐Ÿงช Test on ${{ matrix.os }} ["${{ matrix.config }}", VTK: "${{ matrix.vtk-system }}"]' @@ -41,8 +43,7 @@ jobs: - name: ๐Ÿ–ฅ๏ธ Setup Environment uses: ./.github/actions/setup with: - container: ${{ matrix.os }} - install-vtk: ${{ matrix.vtk-system }} + os: ${{ matrix.os }} - name: ๐Ÿฆฅ Cache Dependencies uses: actions/cache@v4 diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index b64314e0..f47f23bc 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -12,15 +12,14 @@ on: jobs: check-coding-style: runs-on: ubuntu-latest - container: fedora:41 - steps: - - name: ๐Ÿ–ฅ๏ธ Setup Environment - uses: ./.github/actions/setup - with: - container: ubuntu-latest - install-vtk: true + container: + image: ghcr.io/viennatools/vienna-builder:vtk + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + steps: - name: ๐Ÿ“ฅ Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index caa87dd5..f3d6a8e2 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -11,10 +11,19 @@ jobs: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + include: + - os: ubuntu-latest + container: ghcr.io/viennatools/vienna-builder:stock + - os: windows-latest + - os: macos-latest runs-on: ${{ matrix.os }} - container: ${{ matrix.os == 'ubuntu-latest' && 'fedora:38' || null }} + + container: + image: ${{ matrix.container }} + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} name: "๐Ÿ Test Bindings on ${{ matrix.os }}" @@ -25,8 +34,7 @@ jobs: - name: ๐Ÿ–ฅ๏ธ Setup Environment uses: ./.github/actions/setup with: - container: ${{ matrix.os }} - install-vtk: false + os: ${{ matrix.os }} - name: ๐Ÿ Setup Python uses: actions/setup-python@v5 @@ -65,10 +73,19 @@ jobs: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + include: + - os: ubuntu-latest + container: ghcr.io/viennatools/vienna-builder:stock + - os: windows-latest + - os: macos-latest runs-on: ${{ matrix.os }} - container: ${{ matrix.os == 'ubuntu-latest' && 'fedora:38' || null }} + + container: + image: ${{ matrix.container }} + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} name: "๐Ÿ Package Bindings on ${{ matrix.os }}" @@ -79,8 +96,7 @@ jobs: - name: ๐Ÿ–ฅ๏ธ Setup Environment uses: ./.github/actions/setup with: - container: ${{ matrix.os }} - install-vtk: false + os: ${{ matrix.os }} - name: ๐Ÿ Setup Python uses: actions/setup-python@v5