Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 2 additions & 98 deletions .github/workflows/buildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,101 +3,5 @@ name: "Build and Test"
on: ["push", "pull_request"]

jobs:
TestOnMacOS-10_15-x86_64:
runs-on: "macos-10.15"
steps:
- uses: "actions/checkout@v2"
- name: "Run tests"
run: "swift test"
# - name: "Test CreateReadWrite"
# run: |
# cd Examples/CreateReadWrite
# swift build
# ./.build/debug/create Package.swift Sources/ Sources/ExtractArchive/ Sources/ExtractArchive/main.swift
# ./.build/debug/read output.cpio
# mkdir outputCPIOExtractFolder
# cd outputCPIOExtractFolder
# ./../.build/debug/extract ../output.cpio
# ls -lahR
TestOnMacOS-11_0-x86_64:
runs-on: "macos-11.0"
steps:
- uses: "actions/checkout@v2"
- name: "Run tests"
run: "swift test"
# - name: "Test CreateReadWrite"
# run: |
# cd Examples/CreateReadWrite
# swift build
# ./.build/debug/create Package.swift Sources/ Sources/ExtractArchive/ Sources/ExtractArchive/main.swift
# ./.build/debug/read output.cpio
# mkdir outputCPIOExtractFolder
# cd outputCPIOExtractFolder
# ./../.build/debug/extract ../output.cpio
# ls -lahR
# TestOnUbuntu-20_04-ARM:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: uraimo/run-on-arch-action@v2.0.7
# with:
# arch: aarch64
# distro: ubuntu20.04
# githubToken: ${{ secrets.GITHUB_TOKEN }}
# run: |
# export DEBIAN_FRONTEND=noninteractive
# apt update -q
# apt install -yq curl sudo
# curl -s https://packagecloud.io/install/repositories/swift-arm/release/script.deb.sh | sudo bash
# apt install -yq swiftlang
# apt update -yq
# swift test
TestOnUbuntu-20_04-x86_64:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- name: "Run tests"
run: "swift test"
- name: "Test CreateReadWrite"
run: |
cd Examples/CreateReadWrite
swift build
./.build/debug/create Package.swift Sources/ Sources/ExtractArchive/ Sources/ExtractArchive/main.swift
./.build/debug/read output.cpio
mkdir outputCPIOExtractFolder
cd outputCPIOExtractFolder
./../.build/debug/extract ../output.cpio
ls -lahR
TestOnWindows10-x86_64:
runs-on: "windows-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "seanmiddleditch/gha-setup-vsdevenv@master"
- name: "Install swift-5.4-RELEASE"
run: 'Install-Binary -Url "https://swift.org/builds/swift-5.4.2-release/windows10/swift-5.4.2-RELEASE/swift-5.4.2-RELEASE-windows10.exe" -Name "installer.exe" -ArgumentList ("-q")'
- name: "Set Environment Variables"
run: |
echo "SDKROOT=C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "DEVELOPER_DIR=C:\Library\Developer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: "Adjust Paths"
run: 'echo "C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin;C:\Library\Swift-development\bin;C:\Library\icu-67\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append'
- name: "Install Supporting Files"
shell: "cmd"
run: |
copy "%SDKROOT%\usr\share\ucrt.modulemap" "%UniversalCRTSdkDir%\Include\%UCRTVersion%\ucrt\module.modulemap"
copy "%SDKROOT%\usr\share\visualc.modulemap" "%VCToolsInstallDir%\include\module.modulemap"
copy "%SDKROOT%\usr\share\visualc.apinotes" "%VCToolsInstallDir%\include\visualc.apinotes"
copy "%SDKROOT%\usr\share\winsdk.modulemap" "%UniversalCRTSdkDir%\Include\%UCRTVersion%\um\module.modulemap"
- name: "Build"
run: "swift build"
# - name: "Test CreateReadWrite"
# run: |
# cd Examples/CreateReadWrite
# ls
# swift build
TestBuildingOnMacOS-11_0-ARM64:
runs-on: "macos-11.0"
steps:
- uses: "actions/checkout@v2"
- name: "Test Building For ARM"
run: "swift build --arch arm64 && swift build --package-path Examples/CreateReadWrite --arch arm64"
"BuildAndTest":
uses: LebJe/SwiftWorkflows/.github/workflows/buildAndTest.yml@main
27 changes: 0 additions & 27 deletions .github/workflows/generateDocumentation.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Run Pre-Commit"

on:
push:
branches:
- "main"

jobs:
PreCommit:
runs-on: "macos-latest"
steps:
- uses: "actions/checkout@v4"
- name: "Install Dependencies"
run: "brew bundle"
- uses: "LebJe/pre-commit-composite-action@0.0.1"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ xcuserdata/
/.swiftpm
Package.resolved
Brewfile.lock.json
Sources/CPIOArchiveKit/CPIOArchiveKit.docc/.docc-build
Sources/ArArchiveKit/ArArchiveKit.docc/.docc-build
Examples/CreateReadWrite/.swiftpm
Examples/CreateReadWrite/.build
.vscode
node_modules
docs
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ repos:
- id: "swift-format"
name: "Format Swift"
- repo: "https://github.com/pre-commit/mirrors-prettier"
rev: "4309ae0bc8b9f39c207bca9c5040ec8a35561a41"
rev: "v4.0.0-alpha.4"
hooks:
- id: "prettier"
name: "Format Markdown"
tags: ["md"]
exclude: "Sources/CPIOArchiveKit/CPIOArchiveKit.docc/|Sources/ArArchiveKit/ArArchiveKit.docc/"
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"singleQuote": false,
"useTabs": true
}
4 changes: 0 additions & 4 deletions .prettierrc.toml

This file was deleted.

4 changes: 4 additions & 0 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: 1
builder:
configs:
- documentation_targets: ["CPIOArchiveKit", "ArArchiveKit"]
9 changes: 5 additions & 4 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--swiftversion 5.3
--swiftversion 5.5
--binarygrouping none
--decimalgrouping none
--hexgrouping none
Expand All @@ -8,11 +8,12 @@
--octalgrouping none
--self insert
--semicolons never
--stripunusedargs unnamed-only
--stripunusedargs closure-only
--wraparguments before-first
--wrapparameters before-first
--disable trailingClosures, typeSugar
--header "Copyright (c) 2021 Jeff Lebrun \n\n \
--maxwidth 120
--header "Copyright (c) 2024 Jeff Lebrun \n\n \
Licensed under the MIT License. \n\n \
The full text of the license can be found in the file named LICENSE.
"
"
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0](https://github.com/LebJe/CPIOArchiveKit/releases/tag/0.2.0) - 2023-12-10

### Added

- `CPIOArchiveType.svr4WithCRC`
- `CPIOArchiveError.missingOrInvalidChecksum(CPIOArchive.Header)`
- DocC documentation

### Changed

- Merged `CPIOArchiveReader/Writer` into `CPIOArchive`
- `Header` is nested under `CPIOArchive` (`CPIOArchive.Header`)
- Merged `ArArchiveReader/Writer` into `ArArchive`
- `Header` is nested under `ArArchive` (`ArArchive.Header`)
- Adding files is done by appending a `CPIOArchive/ArArchive.File` to the `files` property of `CPIOArchive/ArArchive`.
- Updated to Swift 5.5
- Merged ArArchiveKit into ArchiveKit
- Renamed package from CPIOArchiveKit to ArchiveKit, because ArArchiveKit and CPIOArchiveKit are now on the same package.

#### Renamed

- `FileMode` -> `CPIOFileMode`
- `FileType` -> `CPIOFileType`
- `

## [0.1.0](https://github.com/LebJe/CPIOArchiveKit/releases/tag/0.1.0) - 2021-07-21

### Added
Expand Down
2 changes: 2 additions & 0 deletions Examples/CreateReadWrite/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
/Packages
/*.xcodeproj
xcuserdata/
*.cpio
*.a
17 changes: 10 additions & 7 deletions Examples/CreateReadWrite/Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.5

import PackageDescription

Expand All @@ -11,39 +11,42 @@ let package = Package(
.executable(name: "extract", targets: ["ExtractArchive"]),
.executable(name: "chksum", targets: ["ComputeChecksum"]),
],
dependencies: [.package(name: "CPIOArchiveKit", path: "../../")],
dependencies: [.package(name: "ArchiveKit", path: "../../")],
targets: [
.target(
name: "Utilities",
dependencies: [
.product(name: "CPIOArchiveKit", package: "CPIOArchiveKit"),
.product(name: "CPIOArchiveKit", package: "ArchiveKit"),
]
),
.target(
name: "CreateArchive",
dependencies: [
"Utilities",
.product(name: "CPIOArchiveKit", package: "CPIOArchiveKit"),
.product(name: "CPIOArchiveKit", package: "ArchiveKit"),
.product(name: "ArArchiveKit", package: "ArchiveKit"),
]
),
.target(
name: "ReadArchive",
dependencies: [
"Utilities",
.product(name: "CPIOArchiveKit", package: "CPIOArchiveKit"),
.product(name: "CPIOArchiveKit", package: "ArchiveKit"),
.product(name: "ArArchiveKit", package: "ArchiveKit"),
]
),
.target(
name: "ExtractArchive",
dependencies: [
"Utilities",
.product(name: "CPIOArchiveKit", package: "CPIOArchiveKit"),
.product(name: "CPIOArchiveKit", package: "ArchiveKit"),
.product(name: "ArArchiveKit", package: "ArchiveKit"),
]
),
.target(
name: "ComputeChecksum",
dependencies: [
.product(name: "CPIOArchiveKit", package: "CPIOArchiveKit"),
.product(name: "CPIOArchiveKit", package: "ArchiveKit"),
]
),
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021 Jeff Lebrun
// Copyright (c) 2024 Jeff Lebrun
//
// Licensed under the MIT License.
//
Expand Down
Loading