Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2024-05-10 15:56:28 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2024-05-10 15:56:28 +0200
commit683da22298abbd90f51d4dd38a7ec4b0dfb04555 (patch)
treeec2ac04967f9277df038edc362201937b331abe5 /.github/workflows
parentaf7ab9833c9f9944874f0162ae0975175ddc628d (diff)
parent3381cd55673e5105697d354cf4a1be9a7bcef062 (diff)
merged with upstreamHEADmaster
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/bandit.yaml4
-rw-r--r--.github/workflows/flake8.yaml8
-rw-r--r--.github/workflows/github-pages.yml41
-rw-r--r--.github/workflows/iso-build.yaml18
-rw-r--r--.github/workflows/mypy.yaml14
-rw-r--r--.github/workflows/pytest.yaml8
-rw-r--r--.github/workflows/python-build.yml36
-rw-r--r--.github/workflows/python-publish.yml4
-rw-r--r--.github/workflows/translation-check.yaml28
9 files changed, 115 insertions, 46 deletions
diff --git a/.github/workflows/bandit.yaml b/.github/workflows/bandit.yaml
index 84c63348..fee1f837 100644
--- a/.github/workflows/bandit.yaml
+++ b/.github/workflows/bandit.yaml
@@ -4,9 +4,9 @@ jobs:
flake8:
runs-on: ubuntu-latest
container:
- image: archlinux:latest
+ image: archlinux/archlinux:latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: pacman --noconfirm -Syu bandit
- name: Security checkup with Bandit
run: bandit -r archinstall || exit 0
diff --git a/.github/workflows/flake8.yaml b/.github/workflows/flake8.yaml
index d9db80e9..c9346ccc 100644
--- a/.github/workflows/flake8.yaml
+++ b/.github/workflows/flake8.yaml
@@ -4,11 +4,11 @@ jobs:
flake8:
runs-on: ubuntu-latest
container:
- image: archlinux:latest
+ image: archlinux/archlinux:latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: pacman --noconfirm -Syu python python-pip
- - run: python -m pip install --upgrade pip
- - run: pip install flake8
+ - run: pip install --break-system-packages --upgrade pip
+ - run: pip install --break-system-packages flake8
- name: Lint with flake8
run: flake8
diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml
new file mode 100644
index 00000000..65255fd6
--- /dev/null
+++ b/.github/workflows/github-pages.yml
@@ -0,0 +1,41 @@
+name: documentation
+
+on:
+ push:
+ paths:
+ - "docs/**"
+
+ pull_request:
+ paths:
+ - "docs/**"
+
+ workflow_dispatch:
+
+permissions:
+ contents: write
+
+jobs:
+ docs:
+ runs-on: ubuntu-latest
+ container:
+ image: archlinux/archlinux:latest
+ options: --privileged
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ - name: Install pre-dependencies
+ run: |
+ pacman -Sy --noconfirm tree git python-pyparted python-simple-term-menu python-setuptools python-sphinx python-sphinx_rtd_theme python-build python-installer python-wheel
+ - name: Sphinx build
+ run: |
+ sphinx-build docs _build
+ - name: Deploy to GitHub Pages
+ uses: peaceiris/actions-gh-pages@v4
+ # if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
+ with:
+ publish_branch: gh-pages
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: _build/
+ force_orphan: true
+ enable_jekyll: false # This is required to preserve _static (and thus the theme)
+ cname: archinstall.archlinux.page \ No newline at end of file
diff --git a/.github/workflows/iso-build.yaml b/.github/workflows/iso-build.yaml
index ab4e6f5f..b86c47ec 100644
--- a/.github/workflows/iso-build.yaml
+++ b/.github/workflows/iso-build.yaml
@@ -23,27 +23,17 @@ jobs:
build:
runs-on: ubuntu-latest
container:
- image: archlinux:latest
+ image: archlinux/archlinux:latest
options: --privileged
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: pwd
- run: find .
- run: cat /etc/os-release
- run: pacman-key --init
- run: pacman --noconfirm -Sy archlinux-keyring
- - run: mkdir -p /tmp/archlive/airootfs/root/archinstall-git; cp -r . /tmp/archlive/airootfs/root/archinstall-git
- - run: echo "pip uninstall archinstall -y; cd archinstall-git; rm -rf dist; python -m build -n; pip install dist/archinstall*.whl" > /tmp/archlive/airootfs/root/.zprofile
- - run: echo "echo \"This is an unofficial ISO for development and testing of archinstall. No support will be provided.\"" >> /tmp/archlive/airootfs/root/.zprofile
- - run: echo "echo \"This ISO was built from Git SHA $GITHUB_SHA\"" >> /tmp/archlive/airootfs/root/.zprofile
- - run: echo "echo \"Type archinstall to launch the installer.\"" >> /tmp/archlive/airootfs/root/.zprofile
- - run: cat /tmp/archlive/airootfs/root/.zprofile
- - run: pacman -Sy; pacman --noconfirm -S git archiso
- - run: cp -r /usr/share/archiso/configs/releng/* /tmp/archlive
- - run: echo -e "git\npython\npython-pip\npython-build\npython-flit\npython-setuptools\npython-wheel" >> /tmp/archlive/packages.x86_64
- - run: find /tmp/archlive
- - run: cd /tmp/archlive; mkarchiso -v -w work/ -o out/ ./
- - uses: actions/upload-artifact@v3
+ - run: ./build_iso.sh
+ - uses: actions/upload-artifact@v4
with:
name: Arch Live ISO
path: /tmp/archlive/out/*.iso
diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml
index 20c98f3b..39306cd6 100644
--- a/.github/workflows/mypy.yaml
+++ b/.github/workflows/mypy.yaml
@@ -4,19 +4,15 @@ jobs:
mypy:
runs-on: ubuntu-latest
container:
- image: archlinux:latest
+ image: archlinux/archlinux:latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: pacman --noconfirm -Syu python mypy python-pip
- - run: python -m pip install --upgrade pip
- - run: pip install fastapi pydantic
+ - run: pip install --break-system-packages --upgrade pip
+ - run: pip install --break-system-packages fastapi pydantic
- run: python --version
- run: mypy --version
# one day this will be enabled
# run: mypy --strict --module archinstall || exit 0
- name: run mypy
- run: mypy --follow-imports=silent archinstall/lib/menu/abstract_menu.py archinstall/lib/menu/global_menu.py
- archinstall/lib/models/network_configuration.py archinstall/lib/menu/list_manager.py archinstall/lib/user_interaction/network_conf.py archinstall/lib/models/users.py
- archinstall/lib/disk/blockdevice.py archinstall/lib/user_interaction/subvolume_config.py archinstall/lib/disk/btrfs/btrfs_helpers.py
- archinstall/lib/translationhandler.py archinstall/lib/disk/diskinfo.py archinstall/lib/menu/table_selection_menu.py archinstall/lib/hsm
- archinstall/lib/disk/encryption.py archinstall/lib/models/disk_encryption.py
+ run: mypy --config-file pyproject.toml
diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml
index 568a6e6c..6c62dd54 100644
--- a/.github/workflows/pytest.yaml
+++ b/.github/workflows/pytest.yaml
@@ -4,12 +4,12 @@ jobs:
pytest:
runs-on: ubuntu-latest
container:
- image: archlinux:latest
+ image: archlinux/archlinux:latest
options: --privileged
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- run: pacman --noconfirm -Syu python python-pip qemu gcc
- - run: python -m pip install --upgrade pip
- - run: pip install pytest
+ - run: python -m pip install --break-system-packages --upgrade pip
+ - run: pip install --break-system-packages pytest
- name: Test with pytest
run: python -m pytest || exit 0
diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml
index 647ad70e..483e451b 100644
--- a/.github/workflows/python-build.yml
+++ b/.github/workflows/python-build.yml
@@ -7,20 +7,34 @@ on: [ push, pull_request ]
jobs:
deploy:
runs-on: ubuntu-latest
+ container:
+ image: archlinux/archlinux:latest
+ options: --privileged
steps:
- - uses: actions/checkout@v3
- - name: Set up Python
- uses: actions/setup-python@v4
- with:
- python-version: '3.x'
- - name: Install dependencies
+ - uses: actions/checkout@v4
+ - name: Prepare arch
+ run: |
+ pacman-key --init
+ pacman --noconfirm -Sy archlinux-keyring
+ pacman --noconfirm -Syyu
+ pacman --noconfirm -Sy python-pip python-pyparted python-simple-term-menu pkgconfig gcc
+ - name: Install build dependencies
run: |
- python -m pip install --upgrade pip
- pip install build twine
+ python -m pip install --break-system-packages --upgrade pip
+ pip install --break-system-packages --upgrade build twine wheel setuptools installer
+ pip uninstall archinstall -y --break-system-packages
- name: Build archinstall
+ run: python -m build --wheel --no-isolation
+ - name: Install archinstall
+ run: python -m installer dist/*.whl
+ - name: Run archinstall
run: |
- python -m build . --wheel
- - uses: actions/upload-artifact@v3
+ python -V
+ archinstall --script guided -v
+ archinstall --script swiss -v
+ archinstall --script only_hd -v
+ archinstall --script minimal -v
+ - uses: actions/upload-artifact@v4
with:
name: archinstall
- path: dist/* \ No newline at end of file
+ path: dist/*
diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml
index 8a5bd679..0cf71783 100644
--- a/.github/workflows/python-publish.yml
+++ b/.github/workflows/python-publish.yml
@@ -13,9 +13,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Set up Python
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
diff --git a/.github/workflows/translation-check.yaml b/.github/workflows/translation-check.yaml
new file mode 100644
index 00000000..3cd4d14c
--- /dev/null
+++ b/.github/workflows/translation-check.yaml
@@ -0,0 +1,28 @@
+#on:
+# push:
+# paths:
+# - 'archinstall/locales/**'
+# pull_request:
+# paths:
+# - 'archinstall/locales/**'
+#name: Verify local_generate script was run on translation changes
+#jobs:
+# translation-check:
+# runs-on: ubuntu-latest
+# container:
+# image: archlinux/archlinux:latest
+# steps:
+# - uses: actions/checkout@v4
+# - run: pacman --noconfirm -Syu python git diffutils
+# - name: Verify all translation scripts are up to date
+# run: |
+# cd ..
+# cp -r archinstall archinstall_orig
+# cd archinstall/archinstall/locales
+# bash locales_generator.sh 1> /dev/null
+# cd ../../..
+# git diff \
+# --quiet --no-index --name-only \
+# archinstall_orig/archinstall/locales \
+# archinstall/archinstall/locales \
+# || (echo "Translation files have not been updated after translation, please run ./locales_generator.sh once more and commit" && exit 1)