CI iteration #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux Build | |
on: | |
push: | |
branches: [ feature/LinuxCiBuild ] # Trigger the workflow on push to the 'main' branch | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest # Use the latest Ubuntu environment | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
path: ${{ github.workspace }}/InterSpec_code | |
submodules: true # Recursively checkout submodules | |
- name: Cache npm dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{runner.temp}}/build_linux_working_dir | |
key: ${{ runner.os }}-build-npm-${{ hashFiles('target/electron/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-npm- | |
- name: Cache c++ dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{runner.temp}}/build_linux_electron | |
key: ${{ runner.os }}-build-cpp-${{ hashFiles('cmake/FetchInterSpecDeps.txt') }} | |
restore-keys: | | |
${{ runner.os }}-build-cpp- | |
- name: Make build directories | |
shell: bash | |
working-directory: ${{runner.temp}} | |
run: | | |
mkdir -p build_linux_electron | |
mkdir -p build_linux_working_dir | |
- name: Configure and build in Docker | |
uses: addnab/docker-run-action@v3 | |
env: | |
LEAFLET_KEY: ${{ secrets.LEAFLET_KEY }} | |
with: | |
image: quay.io/pypa/manylinux_2_28_x86_64 | |
shell: bash | |
options: --name manylinux-container -v ${{ github.workspace }}/InterSpec_code:/interspec -v ${{runner.temp}}/build_linux_electron/:/build_app -v ${{runner.temp}}/build_linux_working_dir:/build_working_dir -e LEAFLET_KEY=${{ secrets.LEAFLET_KEY }} | |
run: | | |
echo "Running Script from within docker" | |
/interspec/target/electron/build_linux_app_from_docker.sh /interspec /build_app /build_working_dir | |
- name: Upload Linux artifact | |
uses: actions/upload-artifact@v4 | |
id: artifact-linux-upload-step | |
with: | |
name: linux-build | |
overwrite: true | |
path: ${{runner.temp}}/build_linux_working_dir/InterSpec_app_Linux_Electron_latest_*.zip |