Bump fossable from 0.1.0 to 0.1.1 #223
Workflow file for this run
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: build | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build-linux: | |
name: Build Linux | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install dependencies | |
run: | | |
#sudo dpkg --add-architecture arm64 | |
sudo apt-get update | |
sudo apt-get install -y libudev-dev libgtk-4-dev jq | |
#sudo apt-get install -y libudev-dev:arm64 libgtk-4-dev:arm64 openssl-dev:arm64 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Run unit tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
- name: Build x86_64 | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: goldboot-x86_64-unknown-linux-gnu | |
path: target/release/goldboot | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: goldboot-registry-x86_64-unknown-linux-gnu | |
path: target/release/goldboot-registry | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: goldboot-linux-x86_64-unknown-linux-gnu | |
path: target/release/goldboot-linux | |
- name: Build goldboot-linux image x86_64 | |
run: | | |
export RUST_BACKTRACE=1 | |
export RUST_LOG=debug | |
target/release/goldboot init --template GoldbootLinux | |
jq '.templates[0].executable = "target/release/goldboot-linux"' goldboot.json >goldboot.json.tmp | |
mv goldboot.json.tmp goldboot.json | |
target/release/goldboot build --output goldboot-linux-x86_64.gb | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: goldboot-linux-x86_64.gb | |
path: goldboot-linux-x86_64.gb | |
build-macos: | |
name: Build macOS | |
runs-on: macos-latest | |
steps: | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Disable goldboot-linux | |
run: sed -i '' '/goldboot-linux/d' Cargo.toml | |
- name: Run unit tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
- name: Build x86_64 | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: goldboot-x86_64-apple-darwin | |
path: target/release/goldboot | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: goldboot-registry-x86_64-apple-darwin | |
path: target/release/goldboot-registry | |
build-windows: | |
name: Build Windows | |
runs-on: windows-latest | |
steps: | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Disable goldboot-linux | |
run: sed -i '/goldboot-linux/d' Cargo.toml | |
- name: Run unit tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
- name: Build x86_64 | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: goldboot-x86_64-pc-windows-msvc | |
path: target/release/goldboot | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: goldboot-registry-x86_64-pc-windows-msvc | |
path: target/release/goldboot-registry | |
test-x86_64: | |
if: github.event_name != 'pull_request' | |
name: Test ${{ matrix.profile }} x86_64 | |
runs-on: ubuntu-22.04 | |
needs: build-linux | |
strategy: | |
fail-fast: false | |
matrix: | |
profile: [ArchLinux, Debian] | |
steps: | |
- name: Increase free space | |
uses: easimon/maximize-build-space@master | |
with: | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
- name: Install goldboot | |
uses: actions/download-artifact@v3 | |
with: | |
name: goldboot-x86_64-unknown-linux-gnu | |
path: /home/runner/.local/bin | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y qemu-system-x86 | |
sudo mkdir -p /var/lib/goldboot/images | |
sudo chmod -R 777 /var/lib/goldboot | |
sudo chmod +x /home/runner/.local/bin/goldboot | |
- name: Run goldboot | |
run: | | |
export RUST_LOG=debug | |
goldboot init --template ${{ matrix.profile }} --disk 16G | |
goldboot build --record | |
fallocate -l 16GiB disk.raw | |
goldboot write --image ${{ matrix.profile }} --output disk.raw | |
- name: Store debug output | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Debug output | |
path: './screenshots' |